#include <math.h>
#include <gsl/gsl_rng.h>
#include <gsl/gsl_randist.h>
#include "ran_tg.h"
#include "ziggurat.h"
#include "ran_tg_devroye.h"
#include "ran_tg_reject.h"


double ran_tg_zig1000(gsl_rng *r,double a)
{
// Simulate x~N(0,1), subject to x>a, using generator r
// Zig's method

    /* Insert here */
    //****************************
#define N 1001 //total number of vertical boxes
#define I0 819
#define INVH 407.489751181
#define AMIN -2.00952818979
#define AMAX 2.08793298706

static const double x[1002]={
-2.00952818979, -1.99169323182, -1.9744575659, -1.95777796004, 
-1.94161575699, -1.92593624781, -1.91070814922, -1.8959031649, 
-1.88149561494, -1.86746212118, -1.85378133852, -1.84043372449, 
-1.82740134062, -1.81466768047, -1.80221752025, -1.79003678837, 
-1.77811245132, -1.7664324133, -1.75498542777, -1.74376101921, 
-1.7327494137, -1.72194147723, -1.71132866058, -1.70090295007, 
-1.69065682344, -1.68058321014, -1.67067545561, -1.66092728901, 
-1.65133279402, -1.64188638243, -1.6325827701, -1.6234169551, 
-1.61438419783, -1.60548000281, -1.59670010204, -1.58804043983, 
-1.57949715876, -1.57106658689, -1.56274522593, -1.55452974039, 
-1.5464169475, -1.53840380798, -1.53048741742, -1.52266499838, 
-1.51493389303, -1.50729155628, -1.49973554943, -1.4922635343, 
-1.48487326772, -1.47756259636, -1.47032945201, -1.46317184703, 
-1.45608787027, -1.44907568306, -1.44213351563, -1.43525966363, 
-1.42845248492, -1.42171039656, -1.41503187195, -1.40841543817, 
-1.40185967347, -1.39536320489, -1.38892470603, -1.38254289496, 
-1.37621653219, -1.36994441885, -1.3637253949, -1.35755833742, 
-1.35144215905, -1.3453758065, -1.33935825908, -1.33338852742, 
-1.3274656521, -1.32158870253, -1.31575677573, -1.30996899525, 
-1.30422451014, -1.29852249394, -1.29286214377, -1.28724267938, 
-1.28166334235, -1.27612339522, -1.27062212077, -1.26515882123, 
-1.2597328176, -1.25434344897, -1.24899007186, -1.24367205962, 
-1.23838880185, -1.23313970381, -1.22792418587, -1.22274168305, 
-1.21759164449, -1.21247353295, -1.20738682441, -1.2023310076, 
-1.19730558361, -1.19231006544, -1.18734397769, -1.18240685612, 
-1.17749824733, -1.17261770844, -1.16776480672, -1.1629391193, 
-1.15814023288, -1.15336774339, -1.14862125579, -1.14390038373, 
-1.13920474933, -1.1345339829, -1.12988772273, -1.12526561487, 
-1.12066731284, -1.11609247751, -1.11154077679, -1.10701188553, 
-1.10250548526, -1.09802126401, -1.09355891617, -1.08911814228, 
-1.08469864887, -1.08030014831, -1.07592235862, -1.07156500339, 
-1.06722781155, -1.06291051727, -1.05861285984, -1.0543345835, 
-1.05007543734, -1.04583517515, -1.04161355534, -1.03741034078, 
-1.03322529871, -1.02905820064, -1.02490882222, -1.02077694316, 
-1.01666234713, -1.01256482162, -1.00848415793, -1.00442015099, 
-1.00037259935, -0.996341305028, -0.992326073486, -0.988326713505, 
-0.984343037133, -0.9803748596, -0.976421999245, -0.972484277447, 
-0.968561518557, -0.964653549827, -0.960760201346, -0.956881305979, 
-0.953016699301, -0.949166219542, -0.945329707525, -0.941507006609, 
-0.937697962637, -0.93390242388, -0.930120240985, -0.926351266924, 
-0.922595356947, -0.918852368528, -0.915122161327, -0.911404597134, 
-0.907699539833, -0.904006855355, -0.900326411636, -0.896658078575, 
-0.893001727997, -0.88935723361, -0.885724470971, -0.882103317446, 
-0.878493652175, -0.874895356034, -0.871308311607, -0.867732403146, 
-0.864167516542, -0.860613539289, -0.85707036046, -0.85353787067, 
-0.850015962047, -0.846504528208, -0.843003464225, -0.839512666601, 
-0.83603203324, -0.832561463425, -0.829100857788, -0.825650118288, 
-0.822209148184, -0.818777852011, -0.815356135562, -0.811943905856, 
-0.808541071124, -0.805147540782, -0.801763225412, -0.79838803674, 
-0.795021887615, -0.791664691993, -0.78831636491, -0.784976822472, 
-0.781645981829, -0.778323761159, -0.775010079653, -0.771704857492, 
-0.768408015836, -0.7651194768, -0.761839163446, -0.758566999761, 
-0.755302910641, -0.752046821881, -0.748798660154, -0.745558353, 
-0.74232582881, -0.739101016811, -0.735883847055, -0.732674250403, 
-0.729472158512, -0.726277503823, -0.723090219548, -0.719910239655, 
-0.716737498861, -0.713571932614, -0.710413477085, -0.707262069157, 
-0.70411764641, -0.700980147113, -0.697849510212, -0.69472567532, 
-0.691608582706, -0.688498173284, -0.685394388605, -0.682297170845, 
-0.679206462796, -0.676122207858, -0.673044350027, -0.669972833887, 
-0.666907604604, -0.663848607911, -0.660795790104, -0.657749098033, 
-0.654708479093, -0.651673881215, -0.648645252859, -0.645622543007, 
-0.642605701153, -0.639594677296, -0.636589421935, -0.633589886058, 
-0.630596021138, -0.627607779124, -0.624625112434, -0.621647973951, 
-0.61867631701, -0.6157100954, -0.612749263349, -0.609793775525, 
-0.606843587025, -0.60389865337, -0.6009589305, -0.598024374766, 
-0.595094942927, -0.592170592142, -0.589251279965, -0.586336964341, 
-0.583427603597, -0.58052315644, -0.577623581951, -0.574728839579, 
-0.571838889134, -0.568953690789, -0.566073205066, -0.563197392837, 
-0.560326215318, -0.557459634064, -0.554597610965, -0.551740108239, 
-0.548887088431, -0.546038514407, -0.543194349349, -0.540354556751, 
-0.537519100416, -0.534687944453, -0.531861053266, -0.529038391561, 
-0.526219924332, -0.523405616862, -0.52059543472, -0.517789343755, 
-0.514987310091, -0.512189300129, -0.509395280537, -0.50660521825, 
-0.503819080466, -0.501036834642, -0.498258448491, -0.495483889979, 
-0.492713127322, -0.489946128979, -0.487182863656, -0.484423300297, 
-0.481667408082, -0.478915156427, -0.476166514975, -0.4734214536, 
-0.4706799424, -0.467941951695, -0.465207452023, -0.46247641414, 
-0.459748809014, -0.457024607826, -0.454303781963, -0.45158630302, 
-0.448872142791, -0.446161273275, -0.443453666667, -0.440749295356, 
-0.438048131927, -0.435350149152, -0.432655319994, -0.429963617601, 
-0.427275015304, -0.424589486615, -0.421907005226, -0.419227545005, 
-0.416551079993, -0.413877584407, -0.411207032631, -0.408539399217, 
-0.405874658885, -0.403212786517, -0.400553757159, -0.397897546015, 
-0.395244128446, -0.392593479972, -0.389945576264, -0.387300393147, 
-0.384657906595, -0.382018092731, -0.379380927823, -0.376746388287, 
-0.374114450679, -0.371485091696, -0.368858288176, -0.366234017093, 
-0.363612255558, -0.360992980817, -0.358376170246, -0.355761801355, 
-0.35314985178, -0.350540299287, -0.347933121769, -0.34532829724, 
-0.34272580384, -0.34012561983, -0.337527723589, -0.334932093618, 
-0.332338708531, -0.32974754706, -0.327158588051, -0.324571810462, 
-0.321987193361, -0.319404715928, -0.316824357451, -0.314246097325, 
-0.311669915049, -0.309095790228, -0.306523702571, -0.303953631886, 
-0.301385558084, -0.298819461175, -0.296255321264, -0.293693118557, 
-0.291132833352, -0.288574446043, -0.286017937117, -0.283463287151, 
-0.280910476814, -0.278359486865, -0.275810298151, -0.273262891604, 
-0.270717248245, -0.268173349179, -0.265631175592, -0.263090708757, 
-0.260551930025, -0.258014820829, -0.255479362682, -0.252945537173, 
-0.250413325971, -0.247882710819, -0.245353673536, -0.242826196016, 
-0.240300260224, -0.2377758482, -0.235252942051, -0.232731523959, 
-0.230211576172, -0.227693081006, -0.225176020846, -0.222660378143, 
-0.220146135411, -0.217633275231, -0.215121780246, -0.212611633163, 
-0.210102816748, -0.207595313831, -0.205089107299, -0.2025841801, 
-0.200080515237, -0.197578095774, -0.195076904829, -0.192576925576, 
-0.190078141242, -0.187580535111, -0.185084090517, -0.182588790846, 
-0.180094619538, -0.17760156008, -0.175109596011, -0.172618710917, 
-0.170128888433, -0.16764011224, -0.165152366067, -0.162665633688, 
-0.16017989892, -0.157695145626, -0.155211357711, -0.152728519123, 
-0.150246613853, -0.147765625929, -0.145285539423, -0.142806338444, 
-0.140328007141, -0.137850529701, -0.135373890347, -0.132898073338, 
-0.130423062971, -0.127948843576, -0.125475399517, -0.123002715194, 
-0.120530775037, -0.11805956351, -0.115589065106, -0.113119264352, 
-0.110650145802, -0.108181694042, -0.105713893683, -0.103246729368, 
-0.100780185764, -0.0983142475659, -0.0958488994948, -0.0933841262961, 
-0.0909199127401, -0.0884562436209, -0.0859931037557, -0.0835304779843, 
-0.081068351168, -0.0786067081897, -0.0761455339525, -0.0736848133794, 
-0.0712245314126, -0.0687646730128, -0.0663052231587, -0.063846166846, 
-0.0613874890873, -0.0589291749108, -0.0564712093601, -0.0540135774937, 
-0.0515562643838, -0.049099255116, -0.0466425347888, -0.0441860885127, 
-0.0417299014096, -0.0392739586123, -0.0368182452638, -0.0343627465167, 
-0.0319074475324, -0.0294523334807, -0.0269973895391, -0.024542600892, 
-0.0220879527305, -0.0196334302512, -0.017179018656, -0.0147247031513, 
-0.0122704689475, -0.00981630125829, -0.0073621852999, -0.00490810629073, 
-0.00245404945057, 0.0, 0.00245404945057, 0.00490810629073, 
0.0073621852999, 0.00981630125829, 0.0122704689475, 0.0147247031513, 
0.017179018656, 0.0196334302512, 0.0220879527305, 0.024542600892, 
0.0269973895391, 0.0294523334807, 0.0319074475324, 0.0343627465167, 
0.0368182452638, 0.0392739586123, 0.0417299014096, 0.0441860885127, 
0.0466425347888, 0.049099255116, 0.0515562643838, 0.0540135774937, 
0.0564712093601, 0.0589291749108, 0.0613874890873, 0.063846166846, 
0.0663052231587, 0.0687646730128, 0.0712245314126, 0.0736848133794, 
0.0761455339525, 0.0786067081897, 0.081068351168, 0.0835304779843, 
0.0859931037557, 0.0884562436209, 0.0909199127401, 0.0933841262961, 
0.0958488994948, 0.0983142475659, 0.100780185764, 0.103246729368, 
0.105713893683, 0.108181694042, 0.110650145802, 0.113119264352, 
0.115589065106, 0.11805956351, 0.120530775037, 0.123002715194, 
0.125475399517, 0.127948843576, 0.130423062971, 0.132898073338, 
0.135373890347, 0.137850529701, 0.140328007141, 0.142806338444, 
0.145285539423, 0.147765625929, 0.150246613853, 0.152728519123, 
0.155211357711, 0.157695145626, 0.16017989892, 0.162665633688, 
0.165152366067, 0.16764011224, 0.170128888433, 0.172618710917, 
0.175109596011, 0.17760156008, 0.180094619538, 0.182588790846, 
0.185084090517, 0.187580535111, 0.190078141242, 0.192576925576, 
0.195076904829, 0.197578095774, 0.200080515237, 0.2025841801, 
0.205089107299, 0.207595313831, 0.210102816748, 0.212611633163, 
0.215121780246, 0.217633275231, 0.220146135411, 0.222660378143, 
0.225176020846, 0.227693081006, 0.230211576172, 0.232731523959, 
0.235252942051, 0.2377758482, 0.240300260224, 0.242826196016, 
0.245353673536, 0.247882710819, 0.250413325971, 0.252945537173, 
0.255479362682, 0.258014820829, 0.260551930025, 0.263090708757, 
0.265631175592, 0.268173349179, 0.270717248245, 0.273262891604, 
0.275810298151, 0.278359486865, 0.280910476814, 0.283463287151, 
0.286017937117, 0.288574446043, 0.291132833352, 0.293693118557, 
0.296255321264, 0.298819461175, 0.301385558084, 0.303953631886, 
0.306523702571, 0.309095790228, 0.311669915049, 0.314246097325, 
0.316824357451, 0.319404715928, 0.321987193361, 0.324571810462, 
0.327158588051, 0.32974754706, 0.332338708531, 0.334932093618, 
0.337527723589, 0.34012561983, 0.34272580384, 0.34532829724, 
0.347933121769, 0.350540299287, 0.35314985178, 0.355761801355, 
0.358376170246, 0.360992980817, 0.363612255558, 0.366234017093, 
0.368858288176, 0.371485091696, 0.374114450679, 0.376746388287, 
0.379380927823, 0.382018092731, 0.384657906595, 0.387300393147, 
0.389945576264, 0.392593479972, 0.395244128446, 0.397897546015, 
0.400553757159, 0.403212786517, 0.405874658885, 0.408539399217, 
0.411207032631, 0.413877584407, 0.416551079993, 0.419227545005, 
0.421907005226, 0.424589486615, 0.427275015304, 0.429963617601, 
0.432655319994, 0.435350149152, 0.438048131927, 0.440749295356, 
0.443453666667, 0.446161273275, 0.448872142791, 0.45158630302, 
0.454303781963, 0.457024607826, 0.459748809014, 0.46247641414, 
0.465207452023, 0.467941951695, 0.4706799424, 0.4734214536, 
0.476166514975, 0.478915156427, 0.481667408082, 0.484423300297, 
0.487182863656, 0.489946128979, 0.492713127322, 0.495483889979, 
0.498258448491, 0.501036834642, 0.503819080466, 0.50660521825, 
0.509395280537, 0.512189300129, 0.514987310091, 0.517789343755, 
0.52059543472, 0.523405616862, 0.526219924332, 0.529038391561, 
0.531861053266, 0.534687944453, 0.537519100416, 0.540354556751, 
0.543194349349, 0.546038514407, 0.548887088431, 0.551740108239, 
0.554597610965, 0.557459634064, 0.560326215318, 0.563197392837, 
0.566073205066, 0.568953690789, 0.571838889134, 0.574728839579, 
0.577623581951, 0.58052315644, 0.583427603597, 0.586336964341, 
0.589251279965, 0.592170592142, 0.595094942927, 0.598024374766, 
0.6009589305, 0.60389865337, 0.606843587025, 0.609793775525, 
0.612749263349, 0.6157100954, 0.61867631701, 0.621647973951, 
0.624625112434, 0.627607779124, 0.630596021138, 0.633589886058, 
0.636589421935, 0.639594677296, 0.642605701153, 0.645622543007, 
0.648645252859, 0.651673881215, 0.654708479093, 0.657749098033, 
0.660795790104, 0.663848607911, 0.666907604604, 0.669972833887, 
0.673044350027, 0.676122207858, 0.679206462796, 0.682297170845, 
0.685394388605, 0.688498173284, 0.691608582706, 0.69472567532, 
0.697849510212, 0.700980147113, 0.70411764641, 0.707262069157, 
0.710413477085, 0.713571932614, 0.716737498861, 0.719910239655, 
0.723090219548, 0.726277503823, 0.729472158512, 0.732674250403, 
0.735883847055, 0.739101016811, 0.74232582881, 0.745558353, 
0.748798660154, 0.752046821881, 0.755302910641, 0.758566999761, 
0.761839163446, 0.7651194768, 0.768408015836, 0.771704857492, 
0.775010079653, 0.778323761159, 0.781645981829, 0.784976822472, 
0.78831636491, 0.791664691993, 0.795021887615, 0.79838803674, 
0.801763225412, 0.805147540782, 0.808541071124, 0.811943905856, 
0.815356135562, 0.818777852011, 0.822209148184, 0.825650118288, 
0.829100857788, 0.832561463425, 0.83603203324, 0.839512666601, 
0.843003464225, 0.846504528208, 0.850015962047, 0.85353787067, 
0.85707036046, 0.860613539289, 0.864167516542, 0.867732403146, 
0.871308311607, 0.874895356034, 0.878493652175, 0.882103317446, 
0.885724470971, 0.88935723361, 0.893001727997, 0.896658078575, 
0.900326411636, 0.904006855355, 0.907699539833, 0.911404597134, 
0.915122161327, 0.918852368528, 0.922595356947, 0.926351266924, 
0.930120240985, 0.93390242388, 0.937697962637, 0.941507006609, 
0.945329707525, 0.949166219542, 0.953016699301, 0.956881305979, 
0.960760201346, 0.964653549827, 0.968561518557, 0.972484277447, 
0.976421999245, 0.9803748596, 0.984343037133, 0.988326713505, 
0.992326073486, 0.996341305028, 1.00037259935, 1.00442015099, 
1.00848415793, 1.01256482162, 1.01666234713, 1.02077694316, 
1.02490882222, 1.02905820064, 1.03322529871, 1.03741034078, 
1.04161355534, 1.04583517515, 1.05007543734, 1.0543345835, 
1.05861285984, 1.06291051727, 1.06722781155, 1.07156500339, 
1.07592235862, 1.08030014831, 1.08469864887, 1.08911814228, 
1.09355891617, 1.09802126401, 1.10250548526, 1.10701188553, 
1.11154077679, 1.11609247751, 1.12066731284, 1.12526561487, 
1.12988772273, 1.1345339829, 1.13920474933, 1.14390038373, 
1.14862125579, 1.15336774339, 1.15814023288, 1.1629391193, 
1.16776480672, 1.17261770844, 1.17749824733, 1.18240685612, 
1.18734397769, 1.19231006544, 1.19730558361, 1.2023310076, 
1.20738682441, 1.21247353295, 1.21759164449, 1.22274168305, 
1.22792418587, 1.23313970381, 1.23838880185, 1.24367205962, 
1.24899007186, 1.25434344897, 1.2597328176, 1.26515882123, 
1.27062212077, 1.27612339522, 1.28166334235, 1.28724267938, 
1.29286214377, 1.29852249394, 1.30422451014, 1.30996899525, 
1.31575677573, 1.32158870253, 1.3274656521, 1.33338852742, 
1.33935825908, 1.3453758065, 1.35144215905, 1.35755833742, 
1.3637253949, 1.36994441885, 1.37621653219, 1.38254289496, 
1.38892470603, 1.39536320489, 1.40185967347, 1.40841543817, 
1.41503187195, 1.42171039656, 1.42845248492, 1.43525966363, 
1.44213351563, 1.44907568306, 1.45608787027, 1.46317184703, 
1.47032945201, 1.47756259636, 1.48487326772, 1.4922635343, 
1.49973554943, 1.50729155628, 1.51493389303, 1.52266499838, 
1.53048741742, 1.53840380798, 1.5464169475, 1.55452974039, 
1.56274522593, 1.57106658689, 1.57949715876, 1.58804043983, 
1.59670010204, 1.60548000281, 1.61438419783, 1.6234169551, 
1.6325827701, 1.64188638243, 1.65133279402, 1.66092728901, 
1.67067545561, 1.68058321014, 1.69065682344, 1.70090295007, 
1.71132866058, 1.72194147723, 1.7327494137, 1.74376101921, 
1.75498542777, 1.7664324133, 1.77811245132, 1.79003678837, 
1.80221752025, 1.81466768047, 1.82740134062, 1.84043372449, 
1.85378133852, 1.86746212118, 1.88149561494, 1.8959031649, 
1.91070814922, 1.92593624781, 1.94161575699, 1.95777796004, 
1.9744575659, 1.99169323182, 2.00952818979, 2.02801100273, 
2.04719648403, 2.06714682469, 2.08793298706, 2.10963644449, 
2.13235137548, 2.15618746244, 2.18127350665, 2.20776216229, 
2.23583623244, 2.2657171876, 2.29767691796, 2.33205430885, 
2.36927921833, 2.40990819423, 2.45467953633, 2.50460171219, 
2.56110248779, 2.626296164, 2.7035004727, 2.79834100749, 
2.92145315325, 3.09652277974};

static const double yl[1001]={
0.0529694309697, 0.0548935459189, 0.0568022198028, 0.0586958763839, 
0.0605749155086, 0.0624397149509, 0.0642906320949, 0.0661280054672, 
0.0679521561324, 0.0697633889646, 0.0715619938054, 0.0733482465208, 
0.0751224099656, 0.0768847348648, 0.0786354606205, 0.0803748160504, 
0.0821030200665, 0.0838202822974, 0.0855268036613, 0.0872227768942, 
0.0889083870359, 0.0905838118804, 0.0922492223912, 0.0939047830865, 
0.0955506523962, 0.0971869829931, 0.0988139221012, 0.100431611782, 
0.102040189203, 0.103639786883, 0.10523053293, 0.106812551254, 
0.108385961772, 0.109950880601, 0.111507420231, 0.113055689699, 
0.114595794742, 0.116127837947, 0.117651918889, 0.119168134264, 
0.120676578013, 0.122177341436, 0.123670513304, 0.125156179965, 
0.126634425439, 0.128105331513, 0.12956897783, 0.131025441972, 
0.13247479954, 0.133917124226, 0.135352487891, 0.136780960627, 
0.138202610826, 0.139617505238, 0.141025709033, 0.142427285853, 
0.143822297869, 0.14521080583, 0.146592869111, 0.147968545761, 
0.149337892546, 0.150700964989, 0.152057817417, 0.15340850299, 
0.154753073749, 0.156091580643, 0.157424073565, 0.158750601386, 
0.160071211988, 0.161385952289, 0.162694868273, 0.163998005023, 
0.16529540674, 0.166587116772, 0.167873177642, 0.169153631062, 
0.170428517967, 0.171697878528, 0.172961752178, 0.174220177631, 
0.175473192898, 0.176720835314, 0.177963141547, 0.17920014762, 
0.18043188893, 0.181658400259, 0.182879715792, 0.184095869136, 
0.185306893326, 0.18651282085, 0.187713683653, 0.188909513155, 
0.190100340265, 0.191286195388, 0.192467108444, 0.193643108874, 
0.194814225653, 0.195980487303, 0.1971419219, 0.198298557086, 
0.19945042008, 0.200597537685, 0.201739936299, 0.202877641924, 
0.204010680175, 0.205139076287, 0.206262855124, 0.207382041188, 
0.208496658625, 0.209606731235, 0.210712282477, 0.211813335477, 
0.212909913034, 0.214002037629, 0.215089731429, 0.216173016296, 
0.21725191379, 0.218326445178, 0.219396631438, 0.220462493266, 
0.22152405108, 0.222581325027, 0.223634334985, 0.224683100575, 
0.225727641159, 0.226767975846, 0.227804123503, 0.228836102749, 
0.229863931969, 0.230887629315, 0.231907212708, 0.232922699846, 
0.233934108204, 0.234941455042, 0.235944757408, 0.236944032138, 
0.237939295865, 0.238930565018, 0.239917855831, 0.240901184339, 
0.241880566389, 0.242856017638, 0.243827553558, 0.24479518944, 
0.245758940394, 0.246718821356, 0.247674847089, 0.248627032185, 
0.249575391069, 0.250519938002, 0.251460687082, 0.252397652248, 
0.253330847282, 0.254260285813, 0.255185981316, 0.256107947118, 
0.257026196398, 0.257940742192, 0.25885159739, 0.259758774745, 
0.26066228687, 0.261562146242, 0.262458365203, 0.263350955965, 
0.264239930607, 0.265125301084, 0.266007079219, 0.266885276715, 
0.267759905152, 0.268630975986, 0.269498500557, 0.270362490087, 
0.27122295568, 0.272079908329, 0.272933358913, 0.2737833182, 
0.274629796848, 0.275472805409, 0.276312354328, 0.277148453945, 
0.277981114494, 0.278810346112, 0.279636158831, 0.280458562587, 
0.281277567214, 0.282093182453, 0.282905417948, 0.28371428325, 
0.284519787815, 0.285321941009, 0.286120752107, 0.286916230295, 
0.28770838467, 0.288497224244, 0.28928275794, 0.290064994598, 
0.290843942974, 0.291619611742, 0.292392009492, 0.293161144736, 
0.293927025905, 0.294689661351, 0.295449059349, 0.296205228096, 
0.296958175715, 0.297707910252, 0.29845443968, 0.2991977719, 
0.299937914738, 0.300674875951, 0.301408663223, 0.30213928417, 
0.302866746339, 0.303591057208, 0.304312224188, 0.305030254624, 
0.305745155793, 0.306456934909, 0.307165599121, 0.307871155514, 
0.30857361111, 0.30927297287, 0.309969247692, 0.310662442413, 
0.311352563812, 0.312039618604, 0.312723613451, 0.313404554951, 
0.314082449649, 0.31475730403, 0.315429124524, 0.316097917504, 
0.316763689288, 0.317426446142, 0.318086194273, 0.318742939839, 
0.319396688943, 0.320047447636, 0.320695221916, 0.321340017732, 
0.321981840979, 0.322620697505, 0.323256593106, 0.323889533529, 
0.324519524473, 0.325146571588, 0.325770680476, 0.326391856693, 
0.327010105745, 0.327625433096, 0.32823784416, 0.328847344307, 
0.329453938863, 0.330057633106, 0.330658432274, 0.331256341558, 
0.331851366106, 0.332443511024, 0.333032781375, 0.33361918218, 
0.334202718416, 0.334783395023, 0.335361216894, 0.335936188887, 
0.336508315816, 0.337077602457, 0.337644053544, 0.338207673774, 
0.338768467805, 0.339326440255, 0.339881595705, 0.340433938697, 
0.340983473736, 0.34153020529, 0.34207413779, 0.34261527563, 
0.343153623168, 0.343689184726, 0.344221964591, 0.344751967012, 
0.345279196207, 0.345803656355, 0.346325351604, 0.346844286066, 
0.347360463818, 0.347873888906, 0.348384565342, 0.348892497102, 
0.349397688133, 0.349900142346, 0.350399863624, 0.350896855813, 
0.35139112273, 0.351882668161, 0.352371495858, 0.352857609545, 
0.353341012913, 0.353821709622, 0.354299703304, 0.35477499756, 
0.355247595959, 0.355717502043, 0.356184719323, 0.356649251282, 
0.357111101372, 0.357570273018, 0.358026769616, 0.358480594533, 
0.358931751108, 0.359380242653, 0.359826072451, 0.360269243758, 
0.360709759802, 0.361147623784, 0.361582838878, 0.362015408233, 
0.362445334968, 0.362872622178, 0.363297272932, 0.36371929027, 
0.364138677209, 0.36455543674, 0.364969571826, 0.365381085408, 
0.365789980399, 0.366196259689, 0.366599926141, 0.367000982595, 
0.367399431866, 0.367795276743, 0.368188519994, 0.368579164361, 
0.36896721256, 0.369352667287, 0.369735531212, 0.370115806983, 
0.370493497222, 0.370868604531, 0.371241131486, 0.371611080643, 
0.371978454533, 0.372343255665, 0.372705486525, 0.373065149578, 
0.373422247265, 0.373776782006, 0.374128756198, 0.374478172218, 
0.374825032419, 0.375169339133, 0.375511094672, 0.375850301325, 
0.37618696136, 0.376521077024, 0.376852650543, 0.377181684122, 
0.377508179945, 0.377832140176, 0.378153566957, 0.378472462412, 
0.378788828641, 0.379102667727, 0.379413981732, 0.379722772696, 
0.380029042642, 0.38033279357, 0.380634027464, 0.380932746285, 
0.381228951976, 0.38152264646, 0.381813831642, 0.382102509404, 
0.382388681614, 0.382672350117, 0.38295351674, 0.383232183292, 
0.383508351562, 0.383782023321, 0.384053200321, 0.384321884296, 
0.384588076959, 0.384851780009, 0.385112995124, 0.385371723962, 
0.385627968166, 0.38588172936, 0.38613300915, 0.386381809122, 
0.386628130848, 0.386871975878, 0.387113345748, 0.387352241974, 
0.387588666055, 0.387822619473, 0.388054103691, 0.388283120157, 
0.3885096703, 0.388733755532, 0.388955377249, 0.389174536827, 
0.389391235628, 0.389605474996, 0.389817256257, 0.390026580722, 
0.390233449684, 0.390437864419, 0.390639826188, 0.390839336232, 
0.39103639578, 0.39123100604, 0.391423168206, 0.391612883456, 
0.39180015295, 0.391984977833, 0.392167359232, 0.392347298261, 
0.392524796014, 0.392699853571, 0.392872471996, 0.393042652336, 
0.393210395624, 0.393375702874, 0.393538575087, 0.393699013246, 
0.39385701832, 0.39401259126, 0.394165733004, 0.394316444473, 
0.394464726572, 0.394610580191, 0.394754006203, 0.394895005469, 
0.39503357883, 0.395169727114, 0.395303451135, 0.395434751688, 
0.395563629556, 0.395690085505, 0.395814120285, 0.395935734633, 
0.39605492927, 0.3961717049, 0.396286062214, 0.396398001887, 
0.396507524579, 0.396614630935, 0.396719321585, 0.396821597144, 
0.396921458211, 0.397018905373, 0.397113939198, 0.397206560243, 
0.397296769047, 0.397384566135, 0.397469952018, 0.397552927193, 
0.397633492139, 0.397711647323, 0.397787393197, 0.397860730196, 
0.397931658743, 0.398000179246, 0.398066292096, 0.398129997671, 
0.398191296335, 0.398250188436, 0.398306674308, 0.39836075427, 
0.398412428628, 0.39846169767, 0.398508561674, 0.398553020899, 
0.398595075592, 0.398634725985, 0.398671972295, 0.398706814725, 
0.398739253463, 0.398769288684, 0.398796920546, 0.398822149194, 
0.398844974758, 0.398865397354, 0.398883417084, 0.398899034035, 
0.398912248278, 0.398923059871, 0.398931468859, 0.398937475269, 
0.398941079116, 0.398941079116, 0.398937475269, 0.398931468859, 
0.398923059871, 0.398912248278, 0.398899034035, 0.398883417084, 
0.398865397354, 0.398844974758, 0.398822149194, 0.398796920546, 
0.398769288684, 0.398739253463, 0.398706814725, 0.398671972295, 
0.398634725985, 0.398595075592, 0.398553020899, 0.398508561674, 
0.39846169767, 0.398412428628, 0.39836075427, 0.398306674308, 
0.398250188436, 0.398191296335, 0.398129997671, 0.398066292096, 
0.398000179246, 0.397931658743, 0.397860730196, 0.397787393197, 
0.397711647323, 0.397633492139, 0.397552927193, 0.397469952018, 
0.397384566135, 0.397296769047, 0.397206560243, 0.397113939198, 
0.397018905373, 0.396921458211, 0.396821597144, 0.396719321585, 
0.396614630935, 0.396507524579, 0.396398001887, 0.396286062214, 
0.3961717049, 0.39605492927, 0.395935734633, 0.395814120285, 
0.395690085505, 0.395563629556, 0.395434751688, 0.395303451135, 
0.395169727114, 0.39503357883, 0.394895005469, 0.394754006203, 
0.394610580191, 0.394464726572, 0.394316444473, 0.394165733004, 
0.39401259126, 0.39385701832, 0.393699013246, 0.393538575087, 
0.393375702874, 0.393210395624, 0.393042652336, 0.392872471996, 
0.392699853571, 0.392524796014, 0.392347298261, 0.392167359232, 
0.391984977833, 0.39180015295, 0.391612883456, 0.391423168206, 
0.39123100604, 0.39103639578, 0.390839336232, 0.390639826188, 
0.390437864419, 0.390233449684, 0.390026580722, 0.389817256257, 
0.389605474996, 0.389391235628, 0.389174536827, 0.388955377249, 
0.388733755532, 0.3885096703, 0.388283120157, 0.388054103691, 
0.387822619473, 0.387588666055, 0.387352241974, 0.387113345748, 
0.386871975878, 0.386628130848, 0.386381809122, 0.38613300915, 
0.38588172936, 0.385627968166, 0.385371723962, 0.385112995124, 
0.384851780009, 0.384588076959, 0.384321884296, 0.384053200321, 
0.383782023321, 0.383508351562, 0.383232183292, 0.38295351674, 
0.382672350117, 0.382388681614, 0.382102509404, 0.381813831642, 
0.38152264646, 0.381228951976, 0.380932746285, 0.380634027464, 
0.38033279357, 0.380029042642, 0.379722772696, 0.379413981732, 
0.379102667727, 0.378788828641, 0.378472462412, 0.378153566957, 
0.377832140176, 0.377508179945, 0.377181684122, 0.376852650543, 
0.376521077024, 0.37618696136, 0.375850301325, 0.375511094672, 
0.375169339133, 0.374825032419, 0.374478172218, 0.374128756198, 
0.373776782006, 0.373422247265, 0.373065149578, 0.372705486525, 
0.372343255665, 0.371978454533, 0.371611080643, 0.371241131486, 
0.370868604531, 0.370493497222, 0.370115806983, 0.369735531212, 
0.369352667287, 0.36896721256, 0.368579164361, 0.368188519994, 
0.367795276743, 0.367399431866, 0.367000982595, 0.366599926141, 
0.366196259689, 0.365789980399, 0.365381085408, 0.364969571826, 
0.36455543674, 0.364138677209, 0.36371929027, 0.363297272932, 
0.362872622178, 0.362445334968, 0.362015408233, 0.361582838878, 
0.361147623784, 0.360709759802, 0.360269243758, 0.359826072451, 
0.359380242653, 0.358931751108, 0.358480594533, 0.358026769616, 
0.357570273018, 0.357111101372, 0.356649251282, 0.356184719323, 
0.355717502043, 0.355247595959, 0.35477499756, 0.354299703304, 
0.353821709622, 0.353341012913, 0.352857609545, 0.352371495858, 
0.351882668161, 0.35139112273, 0.350896855813, 0.350399863624, 
0.349900142346, 0.349397688133, 0.348892497102, 0.348384565342, 
0.347873888906, 0.347360463818, 0.346844286066, 0.346325351604, 
0.345803656355, 0.345279196207, 0.344751967012, 0.344221964591, 
0.343689184726, 0.343153623168, 0.34261527563, 0.34207413779, 
0.34153020529, 0.340983473736, 0.340433938697, 0.339881595705, 
0.339326440255, 0.338768467805, 0.338207673774, 0.337644053544, 
0.337077602457, 0.336508315816, 0.335936188887, 0.335361216894, 
0.334783395023, 0.334202718416, 0.33361918218, 0.333032781375, 
0.332443511024, 0.331851366106, 0.331256341558, 0.330658432274, 
0.330057633106, 0.329453938863, 0.328847344307, 0.32823784416, 
0.327625433096, 0.327010105745, 0.326391856693, 0.325770680476, 
0.325146571588, 0.324519524473, 0.323889533529, 0.323256593106, 
0.322620697505, 0.321981840979, 0.321340017732, 0.320695221916, 
0.320047447636, 0.319396688943, 0.318742939839, 0.318086194273, 
0.317426446142, 0.316763689288, 0.316097917504, 0.315429124524, 
0.31475730403, 0.314082449649, 0.313404554951, 0.312723613451, 
0.312039618604, 0.311352563812, 0.310662442413, 0.309969247692, 
0.30927297287, 0.30857361111, 0.307871155514, 0.307165599121, 
0.306456934909, 0.305745155793, 0.305030254624, 0.304312224188, 
0.303591057208, 0.302866746339, 0.30213928417, 0.301408663223, 
0.300674875951, 0.299937914738, 0.2991977719, 0.29845443968, 
0.297707910252, 0.296958175715, 0.296205228096, 0.295449059349, 
0.294689661351, 0.293927025905, 0.293161144736, 0.292392009492, 
0.291619611742, 0.290843942974, 0.290064994598, 0.28928275794, 
0.288497224244, 0.28770838467, 0.286916230295, 0.286120752107, 
0.285321941009, 0.284519787815, 0.28371428325, 0.282905417948, 
0.282093182453, 0.281277567214, 0.280458562587, 0.279636158831, 
0.278810346112, 0.277981114494, 0.277148453945, 0.276312354328, 
0.275472805409, 0.274629796848, 0.2737833182, 0.272933358913, 
0.272079908329, 0.27122295568, 0.270362490087, 0.269498500557, 
0.268630975986, 0.267759905152, 0.266885276715, 0.266007079219, 
0.265125301084, 0.264239930607, 0.263350955965, 0.262458365203, 
0.261562146242, 0.26066228687, 0.259758774745, 0.25885159739, 
0.257940742192, 0.257026196398, 0.256107947118, 0.255185981316, 
0.254260285813, 0.253330847282, 0.252397652248, 0.251460687082, 
0.250519938002, 0.249575391069, 0.248627032185, 0.247674847089, 
0.246718821356, 0.245758940394, 0.24479518944, 0.243827553558, 
0.242856017638, 0.241880566389, 0.240901184339, 0.239917855831, 
0.238930565018, 0.237939295865, 0.236944032138, 0.235944757408, 
0.234941455042, 0.233934108204, 0.232922699846, 0.231907212708, 
0.230887629315, 0.229863931969, 0.228836102749, 0.227804123503, 
0.226767975846, 0.225727641159, 0.224683100575, 0.223634334985, 
0.222581325027, 0.22152405108, 0.220462493266, 0.219396631438, 
0.218326445178, 0.21725191379, 0.216173016296, 0.215089731429, 
0.214002037629, 0.212909913034, 0.211813335477, 0.210712282477, 
0.209606731235, 0.208496658625, 0.207382041188, 0.206262855124, 
0.205139076287, 0.204010680175, 0.202877641924, 0.201739936299, 
0.200597537685, 0.19945042008, 0.198298557086, 0.1971419219, 
0.195980487303, 0.194814225653, 0.193643108874, 0.192467108444, 
0.191286195388, 0.190100340265, 0.188909513155, 0.187713683653, 
0.18651282085, 0.185306893326, 0.184095869136, 0.182879715792, 
0.181658400259, 0.18043188893, 0.17920014762, 0.177963141547, 
0.176720835314, 0.175473192898, 0.174220177631, 0.172961752178, 
0.171697878528, 0.170428517967, 0.169153631062, 0.167873177642, 
0.166587116772, 0.16529540674, 0.163998005023, 0.162694868273, 
0.161385952289, 0.160071211988, 0.158750601386, 0.157424073565, 
0.156091580643, 0.154753073749, 0.15340850299, 0.152057817417, 
0.150700964989, 0.149337892546, 0.147968545761, 0.146592869111, 
0.14521080583, 0.143822297869, 0.142427285853, 0.141025709033, 
0.139617505238, 0.138202610826, 0.136780960627, 0.135352487891, 
0.133917124226, 0.13247479954, 0.131025441972, 0.12956897783, 
0.128105331513, 0.126634425439, 0.125156179965, 0.123670513304, 
0.122177341436, 0.120676578013, 0.119168134264, 0.117651918889, 
0.116127837947, 0.114595794742, 0.113055689699, 0.111507420231, 
0.109950880601, 0.108385961772, 0.106812551254, 0.10523053293, 
0.103639786883, 0.102040189203, 0.100431611782, 0.0988139221012, 
0.0971869829931, 0.0955506523962, 0.0939047830865, 0.0922492223912, 
0.0905838118804, 0.0889083870359, 0.0872227768942, 0.0855268036613, 
0.0838202822974, 0.0821030200665, 0.0803748160504, 0.0786354606205, 
0.0768847348648, 0.0751224099656, 0.0733482465208, 0.0715619938054, 
0.0697633889646, 0.0679521561324, 0.0661280054672, 0.0642906320949, 
0.0624397149509, 0.0605749155086, 0.0586958763839, 0.0568022198028, 
0.0548935459189, 0.0529694309697, 0.051029425258, 0.0490730509519, 
0.0470997996999, 0.0451091300678, 0.0431004648235, 0.0410731881233, 
0.0390266427053, 0.036960127276, 0.0348728944162, 0.0327641495675, 
0.0306330520594, 0.0284787198406, 0.0263002408271, 0.0240966960703, 
0.0218672042911, 0.0196110058724, 0.0173276220312, 0.0150171633347, 
0.0126809513685, 0.0103228444063, 0.00795229486034, 0.00559219839382, 
0.00330220386374};

static const double yu[1001]={
0.0548935459189, 0.0568022198028, 0.0586958763839, 0.0605749155086, 
0.0624397149509, 0.0642906320949, 0.0661280054672, 0.0679521561324, 
0.0697633889646, 0.0715619938054, 0.0733482465208, 0.0751224099656, 
0.0768847348648, 0.0786354606205, 0.0803748160504, 0.0821030200665, 
0.0838202822974, 0.0855268036613, 0.0872227768942, 0.0889083870359, 
0.0905838118804, 0.0922492223912, 0.0939047830865, 0.0955506523962, 
0.0971869829931, 0.0988139221012, 0.100431611782, 0.102040189203, 
0.103639786883, 0.10523053293, 0.106812551254, 0.108385961772, 
0.109950880601, 0.111507420231, 0.113055689699, 0.114595794742, 
0.116127837947, 0.117651918889, 0.119168134264, 0.120676578013, 
0.122177341436, 0.123670513304, 0.125156179965, 0.126634425439, 
0.128105331513, 0.12956897783, 0.131025441972, 0.13247479954, 
0.133917124226, 0.135352487891, 0.136780960627, 0.138202610826, 
0.139617505238, 0.141025709033, 0.142427285853, 0.143822297869, 
0.14521080583, 0.146592869111, 0.147968545761, 0.149337892546, 
0.150700964989, 0.152057817417, 0.15340850299, 0.154753073749, 
0.156091580643, 0.157424073565, 0.158750601386, 0.160071211988, 
0.161385952289, 0.162694868273, 0.163998005023, 0.16529540674, 
0.166587116772, 0.167873177642, 0.169153631062, 0.170428517967, 
0.171697878528, 0.172961752178, 0.174220177631, 0.175473192898, 
0.176720835314, 0.177963141547, 0.17920014762, 0.18043188893, 
0.181658400259, 0.182879715792, 0.184095869136, 0.185306893326, 
0.18651282085, 0.187713683653, 0.188909513155, 0.190100340265, 
0.191286195388, 0.192467108444, 0.193643108874, 0.194814225653, 
0.195980487303, 0.1971419219, 0.198298557086, 0.19945042008, 
0.200597537685, 0.201739936299, 0.202877641924, 0.204010680175, 
0.205139076287, 0.206262855124, 0.207382041188, 0.208496658625, 
0.209606731235, 0.210712282477, 0.211813335477, 0.212909913034, 
0.214002037629, 0.215089731429, 0.216173016296, 0.21725191379, 
0.218326445178, 0.219396631438, 0.220462493266, 0.22152405108, 
0.222581325027, 0.223634334985, 0.224683100575, 0.225727641159, 
0.226767975846, 0.227804123503, 0.228836102749, 0.229863931969, 
0.230887629315, 0.231907212708, 0.232922699846, 0.233934108204, 
0.234941455042, 0.235944757408, 0.236944032138, 0.237939295865, 
0.238930565018, 0.239917855831, 0.240901184339, 0.241880566389, 
0.242856017638, 0.243827553558, 0.24479518944, 0.245758940394, 
0.246718821356, 0.247674847089, 0.248627032185, 0.249575391069, 
0.250519938002, 0.251460687082, 0.252397652248, 0.253330847282, 
0.254260285813, 0.255185981316, 0.256107947118, 0.257026196398, 
0.257940742192, 0.25885159739, 0.259758774745, 0.26066228687, 
0.261562146242, 0.262458365203, 0.263350955965, 0.264239930607, 
0.265125301084, 0.266007079219, 0.266885276715, 0.267759905152, 
0.268630975986, 0.269498500557, 0.270362490087, 0.27122295568, 
0.272079908329, 0.272933358913, 0.2737833182, 0.274629796848, 
0.275472805409, 0.276312354328, 0.277148453945, 0.277981114494, 
0.278810346112, 0.279636158831, 0.280458562587, 0.281277567214, 
0.282093182453, 0.282905417948, 0.28371428325, 0.284519787815, 
0.285321941009, 0.286120752107, 0.286916230295, 0.28770838467, 
0.288497224244, 0.28928275794, 0.290064994598, 0.290843942974, 
0.291619611742, 0.292392009492, 0.293161144736, 0.293927025905, 
0.294689661351, 0.295449059349, 0.296205228096, 0.296958175715, 
0.297707910252, 0.29845443968, 0.2991977719, 0.299937914738, 
0.300674875951, 0.301408663223, 0.30213928417, 0.302866746339, 
0.303591057208, 0.304312224188, 0.305030254624, 0.305745155793, 
0.306456934909, 0.307165599121, 0.307871155514, 0.30857361111, 
0.30927297287, 0.309969247692, 0.310662442413, 0.311352563812, 
0.312039618604, 0.312723613451, 0.313404554951, 0.314082449649, 
0.31475730403, 0.315429124524, 0.316097917504, 0.316763689288, 
0.317426446142, 0.318086194273, 0.318742939839, 0.319396688943, 
0.320047447636, 0.320695221916, 0.321340017732, 0.321981840979, 
0.322620697505, 0.323256593106, 0.323889533529, 0.324519524473, 
0.325146571588, 0.325770680476, 0.326391856693, 0.327010105745, 
0.327625433096, 0.32823784416, 0.328847344307, 0.329453938863, 
0.330057633106, 0.330658432274, 0.331256341558, 0.331851366106, 
0.332443511024, 0.333032781375, 0.33361918218, 0.334202718416, 
0.334783395023, 0.335361216894, 0.335936188887, 0.336508315816, 
0.337077602457, 0.337644053544, 0.338207673774, 0.338768467805, 
0.339326440255, 0.339881595705, 0.340433938697, 0.340983473736, 
0.34153020529, 0.34207413779, 0.34261527563, 0.343153623168, 
0.343689184726, 0.344221964591, 0.344751967012, 0.345279196207, 
0.345803656355, 0.346325351604, 0.346844286066, 0.347360463818, 
0.347873888906, 0.348384565342, 0.348892497102, 0.349397688133, 
0.349900142346, 0.350399863624, 0.350896855813, 0.35139112273, 
0.351882668161, 0.352371495858, 0.352857609545, 0.353341012913, 
0.353821709622, 0.354299703304, 0.35477499756, 0.355247595959, 
0.355717502043, 0.356184719323, 0.356649251282, 0.357111101372, 
0.357570273018, 0.358026769616, 0.358480594533, 0.358931751108, 
0.359380242653, 0.359826072451, 0.360269243758, 0.360709759802, 
0.361147623784, 0.361582838878, 0.362015408233, 0.362445334968, 
0.362872622178, 0.363297272932, 0.36371929027, 0.364138677209, 
0.36455543674, 0.364969571826, 0.365381085408, 0.365789980399, 
0.366196259689, 0.366599926141, 0.367000982595, 0.367399431866, 
0.367795276743, 0.368188519994, 0.368579164361, 0.36896721256, 
0.369352667287, 0.369735531212, 0.370115806983, 0.370493497222, 
0.370868604531, 0.371241131486, 0.371611080643, 0.371978454533, 
0.372343255665, 0.372705486525, 0.373065149578, 0.373422247265, 
0.373776782006, 0.374128756198, 0.374478172218, 0.374825032419, 
0.375169339133, 0.375511094672, 0.375850301325, 0.37618696136, 
0.376521077024, 0.376852650543, 0.377181684122, 0.377508179945, 
0.377832140176, 0.378153566957, 0.378472462412, 0.378788828641, 
0.379102667727, 0.379413981732, 0.379722772696, 0.380029042642, 
0.38033279357, 0.380634027464, 0.380932746285, 0.381228951976, 
0.38152264646, 0.381813831642, 0.382102509404, 0.382388681614, 
0.382672350117, 0.38295351674, 0.383232183292, 0.383508351562, 
0.383782023321, 0.384053200321, 0.384321884296, 0.384588076959, 
0.384851780009, 0.385112995124, 0.385371723962, 0.385627968166, 
0.38588172936, 0.38613300915, 0.386381809122, 0.386628130848, 
0.386871975878, 0.387113345748, 0.387352241974, 0.387588666055, 
0.387822619473, 0.388054103691, 0.388283120157, 0.3885096703, 
0.388733755532, 0.388955377249, 0.389174536827, 0.389391235628, 
0.389605474996, 0.389817256257, 0.390026580722, 0.390233449684, 
0.390437864419, 0.390639826188, 0.390839336232, 0.39103639578, 
0.39123100604, 0.391423168206, 0.391612883456, 0.39180015295, 
0.391984977833, 0.392167359232, 0.392347298261, 0.392524796014, 
0.392699853571, 0.392872471996, 0.393042652336, 0.393210395624, 
0.393375702874, 0.393538575087, 0.393699013246, 0.39385701832, 
0.39401259126, 0.394165733004, 0.394316444473, 0.394464726572, 
0.394610580191, 0.394754006203, 0.394895005469, 0.39503357883, 
0.395169727114, 0.395303451135, 0.395434751688, 0.395563629556, 
0.395690085505, 0.395814120285, 0.395935734633, 0.39605492927, 
0.3961717049, 0.396286062214, 0.396398001887, 0.396507524579, 
0.396614630935, 0.396719321585, 0.396821597144, 0.396921458211, 
0.397018905373, 0.397113939198, 0.397206560243, 0.397296769047, 
0.397384566135, 0.397469952018, 0.397552927193, 0.397633492139, 
0.397711647323, 0.397787393197, 0.397860730196, 0.397931658743, 
0.398000179246, 0.398066292096, 0.398129997671, 0.398191296335, 
0.398250188436, 0.398306674308, 0.39836075427, 0.398412428628, 
0.39846169767, 0.398508561674, 0.398553020899, 0.398595075592, 
0.398634725985, 0.398671972295, 0.398706814725, 0.398739253463, 
0.398769288684, 0.398796920546, 0.398822149194, 0.398844974758, 
0.398865397354, 0.398883417084, 0.398899034035, 0.398912248278, 
0.398923059871, 0.398931468859, 0.398937475269, 0.398941079116, 
0.398942280401, 0.398942280401, 0.398941079116, 0.398937475269, 
0.398931468859, 0.398923059871, 0.398912248278, 0.398899034035, 
0.398883417084, 0.398865397354, 0.398844974758, 0.398822149194, 
0.398796920546, 0.398769288684, 0.398739253463, 0.398706814725, 
0.398671972295, 0.398634725985, 0.398595075592, 0.398553020899, 
0.398508561674, 0.39846169767, 0.398412428628, 0.39836075427, 
0.398306674308, 0.398250188436, 0.398191296335, 0.398129997671, 
0.398066292096, 0.398000179246, 0.397931658743, 0.397860730196, 
0.397787393197, 0.397711647323, 0.397633492139, 0.397552927193, 
0.397469952018, 0.397384566135, 0.397296769047, 0.397206560243, 
0.397113939198, 0.397018905373, 0.396921458211, 0.396821597144, 
0.396719321585, 0.396614630935, 0.396507524579, 0.396398001887, 
0.396286062214, 0.3961717049, 0.39605492927, 0.395935734633, 
0.395814120285, 0.395690085505, 0.395563629556, 0.395434751688, 
0.395303451135, 0.395169727114, 0.39503357883, 0.394895005469, 
0.394754006203, 0.394610580191, 0.394464726572, 0.394316444473, 
0.394165733004, 0.39401259126, 0.39385701832, 0.393699013246, 
0.393538575087, 0.393375702874, 0.393210395624, 0.393042652336, 
0.392872471996, 0.392699853571, 0.392524796014, 0.392347298261, 
0.392167359232, 0.391984977833, 0.39180015295, 0.391612883456, 
0.391423168206, 0.39123100604, 0.39103639578, 0.390839336232, 
0.390639826188, 0.390437864419, 0.390233449684, 0.390026580722, 
0.389817256257, 0.389605474996, 0.389391235628, 0.389174536827, 
0.388955377249, 0.388733755532, 0.3885096703, 0.388283120157, 
0.388054103691, 0.387822619473, 0.387588666055, 0.387352241974, 
0.387113345748, 0.386871975878, 0.386628130848, 0.386381809122, 
0.38613300915, 0.38588172936, 0.385627968166, 0.385371723962, 
0.385112995124, 0.384851780009, 0.384588076959, 0.384321884296, 
0.384053200321, 0.383782023321, 0.383508351562, 0.383232183292, 
0.38295351674, 0.382672350117, 0.382388681614, 0.382102509404, 
0.381813831642, 0.38152264646, 0.381228951976, 0.380932746285, 
0.380634027464, 0.38033279357, 0.380029042642, 0.379722772696, 
0.379413981732, 0.379102667727, 0.378788828641, 0.378472462412, 
0.378153566957, 0.377832140176, 0.377508179945, 0.377181684122, 
0.376852650543, 0.376521077024, 0.37618696136, 0.375850301325, 
0.375511094672, 0.375169339133, 0.374825032419, 0.374478172218, 
0.374128756198, 0.373776782006, 0.373422247265, 0.373065149578, 
0.372705486525, 0.372343255665, 0.371978454533, 0.371611080643, 
0.371241131486, 0.370868604531, 0.370493497222, 0.370115806983, 
0.369735531212, 0.369352667287, 0.36896721256, 0.368579164361, 
0.368188519994, 0.367795276743, 0.367399431866, 0.367000982595, 
0.366599926141, 0.366196259689, 0.365789980399, 0.365381085408, 
0.364969571826, 0.36455543674, 0.364138677209, 0.36371929027, 
0.363297272932, 0.362872622178, 0.362445334968, 0.362015408233, 
0.361582838878, 0.361147623784, 0.360709759802, 0.360269243758, 
0.359826072451, 0.359380242653, 0.358931751108, 0.358480594533, 
0.358026769616, 0.357570273018, 0.357111101372, 0.356649251282, 
0.356184719323, 0.355717502043, 0.355247595959, 0.35477499756, 
0.354299703304, 0.353821709622, 0.353341012913, 0.352857609545, 
0.352371495858, 0.351882668161, 0.35139112273, 0.350896855813, 
0.350399863624, 0.349900142346, 0.349397688133, 0.348892497102, 
0.348384565342, 0.347873888906, 0.347360463818, 0.346844286066, 
0.346325351604, 0.345803656355, 0.345279196207, 0.344751967012, 
0.344221964591, 0.343689184726, 0.343153623168, 0.34261527563, 
0.34207413779, 0.34153020529, 0.340983473736, 0.340433938697, 
0.339881595705, 0.339326440255, 0.338768467805, 0.338207673774, 
0.337644053544, 0.337077602457, 0.336508315816, 0.335936188887, 
0.335361216894, 0.334783395023, 0.334202718416, 0.33361918218, 
0.333032781375, 0.332443511024, 0.331851366106, 0.331256341558, 
0.330658432274, 0.330057633106, 0.329453938863, 0.328847344307, 
0.32823784416, 0.327625433096, 0.327010105745, 0.326391856693, 
0.325770680476, 0.325146571588, 0.324519524473, 0.323889533529, 
0.323256593106, 0.322620697505, 0.321981840979, 0.321340017732, 
0.320695221916, 0.320047447636, 0.319396688943, 0.318742939839, 
0.318086194273, 0.317426446142, 0.316763689288, 0.316097917504, 
0.315429124524, 0.31475730403, 0.314082449649, 0.313404554951, 
0.312723613451, 0.312039618604, 0.311352563812, 0.310662442413, 
0.309969247692, 0.30927297287, 0.30857361111, 0.307871155514, 
0.307165599121, 0.306456934909, 0.305745155793, 0.305030254624, 
0.304312224188, 0.303591057208, 0.302866746339, 0.30213928417, 
0.301408663223, 0.300674875951, 0.299937914738, 0.2991977719, 
0.29845443968, 0.297707910252, 0.296958175715, 0.296205228096, 
0.295449059349, 0.294689661351, 0.293927025905, 0.293161144736, 
0.292392009492, 0.291619611742, 0.290843942974, 0.290064994598, 
0.28928275794, 0.288497224244, 0.28770838467, 0.286916230295, 
0.286120752107, 0.285321941009, 0.284519787815, 0.28371428325, 
0.282905417948, 0.282093182453, 0.281277567214, 0.280458562587, 
0.279636158831, 0.278810346112, 0.277981114494, 0.277148453945, 
0.276312354328, 0.275472805409, 0.274629796848, 0.2737833182, 
0.272933358913, 0.272079908329, 0.27122295568, 0.270362490087, 
0.269498500557, 0.268630975986, 0.267759905152, 0.266885276715, 
0.266007079219, 0.265125301084, 0.264239930607, 0.263350955965, 
0.262458365203, 0.261562146242, 0.26066228687, 0.259758774745, 
0.25885159739, 0.257940742192, 0.257026196398, 0.256107947118, 
0.255185981316, 0.254260285813, 0.253330847282, 0.252397652248, 
0.251460687082, 0.250519938002, 0.249575391069, 0.248627032185, 
0.247674847089, 0.246718821356, 0.245758940394, 0.24479518944, 
0.243827553558, 0.242856017638, 0.241880566389, 0.240901184339, 
0.239917855831, 0.238930565018, 0.237939295865, 0.236944032138, 
0.235944757408, 0.234941455042, 0.233934108204, 0.232922699846, 
0.231907212708, 0.230887629315, 0.229863931969, 0.228836102749, 
0.227804123503, 0.226767975846, 0.225727641159, 0.224683100575, 
0.223634334985, 0.222581325027, 0.22152405108, 0.220462493266, 
0.219396631438, 0.218326445178, 0.21725191379, 0.216173016296, 
0.215089731429, 0.214002037629, 0.212909913034, 0.211813335477, 
0.210712282477, 0.209606731235, 0.208496658625, 0.207382041188, 
0.206262855124, 0.205139076287, 0.204010680175, 0.202877641924, 
0.201739936299, 0.200597537685, 0.19945042008, 0.198298557086, 
0.1971419219, 0.195980487303, 0.194814225653, 0.193643108874, 
0.192467108444, 0.191286195388, 0.190100340265, 0.188909513155, 
0.187713683653, 0.18651282085, 0.185306893326, 0.184095869136, 
0.182879715792, 0.181658400259, 0.18043188893, 0.17920014762, 
0.177963141547, 0.176720835314, 0.175473192898, 0.174220177631, 
0.172961752178, 0.171697878528, 0.170428517967, 0.169153631062, 
0.167873177642, 0.166587116772, 0.16529540674, 0.163998005023, 
0.162694868273, 0.161385952289, 0.160071211988, 0.158750601386, 
0.157424073565, 0.156091580643, 0.154753073749, 0.15340850299, 
0.152057817417, 0.150700964989, 0.149337892546, 0.147968545761, 
0.146592869111, 0.14521080583, 0.143822297869, 0.142427285853, 
0.141025709033, 0.139617505238, 0.138202610826, 0.136780960627, 
0.135352487891, 0.133917124226, 0.13247479954, 0.131025441972, 
0.12956897783, 0.128105331513, 0.126634425439, 0.125156179965, 
0.123670513304, 0.122177341436, 0.120676578013, 0.119168134264, 
0.117651918889, 0.116127837947, 0.114595794742, 0.113055689699, 
0.111507420231, 0.109950880601, 0.108385961772, 0.106812551254, 
0.10523053293, 0.103639786883, 0.102040189203, 0.100431611782, 
0.0988139221012, 0.0971869829931, 0.0955506523962, 0.0939047830865, 
0.0922492223912, 0.0905838118804, 0.0889083870359, 0.0872227768942, 
0.0855268036613, 0.0838202822974, 0.0821030200665, 0.0803748160504, 
0.0786354606205, 0.0768847348648, 0.0751224099656, 0.0733482465208, 
0.0715619938054, 0.0697633889646, 0.0679521561324, 0.0661280054672, 
0.0642906320949, 0.0624397149509, 0.0605749155086, 0.0586958763839, 
0.0568022198028, 0.0548935459189, 0.0529694309697, 0.051029425258, 
0.0490730509519, 0.0470997996999, 0.0451091300678, 0.0431004648235, 
0.0410731881233, 0.0390266427053, 0.036960127276, 0.0348728944162, 
0.0327641495675, 0.0306330520594, 0.0284787198406, 0.0263002408271, 
0.0240966960703, 0.0218672042911, 0.0196110058724, 0.0173276220312, 
0.0150171633347, 0.0126809513685, 0.0103228444063, 0.00795229486034, 
0.00559219839382};

static const double d[1001]={
0.0178349579653, 0.0172356659199, 0.0166796058657, 0.0161622030474, 
0.0156795091842, 0.0152280985912, 0.0148049843196, 0.014407549955, 
0.0140334937645, 0.0136807826608, 0.0133476140258, 0.0130323838716, 
0.012733660144, 0.0124501602242, 0.0121807318777, 0.0119243370492, 
0.0116800380194, 0.0114469855311, 0.0112244085649, 0.0110116055039, 
0.0108079364702, 0.0106128166574, 0.0104257105107, 0.01024612663, 
0.0100736132955, 0.00990775452699, 0.00974816660466, 0.00959449498944, 
0.00944641159029, 0.0093036123335, 0.00916581499586, 0.00903275726874, 
0.00890419502489, 0.00877990076353, 0.00865966221277, 0.00854328107092, 
0.00843057187095, 0.0083213609542, 0.00821548554127, 0.00811279288945, 
0.00801313952753, 0.00791639055964, 0.00782241903117, 0.00773110535018, 
0.00764233675886, 0.00755600684996, 0.00747201512386, 0.00739026658226, 
0.00731067135505, 0.00723314435726, 0.00715760497323, 0.00708397676554, 
0.00701218720645, 0.00694216742992, 0.00687385200222, 0.00680717870968, 
0.00674208836205, 0.00667852461013, 0.00661643377646, 0.00655576469802, 
0.00649646858, 0.00643849885959, 0.0063818110792, 0.00632636276817, 
0.00627211333242, 0.00621902395142, 0.00616705748185, 0.00611617836754, 
0.00606635255513, 0.00601754741511, 0.00596973166772, 0.00592287531359, 
0.00587694956847, 0.00583192680202, 0.00578778048027, 0.00574448511146, 
0.00570201619508, 0.00566035017395, 0.00561946438893, 0.00557933703637, 
0.00553994712784, 0.00550127445222, 0.00546329953981, 0.00542600362848, 
0.00538936863164, 0.00535337710794, 0.00531801223257, 0.00528325777014, 
0.00524909804895, 0.00521551793655, 0.0051825028167, 0.00515003856735, 
0.00511811153984, 0.00508670853916, 0.00505581680506, 0.0050254239943, 
0.00499551816357, 0.0049660877534, 0.00493712157271, 0.00490860878426, 
0.00488053889059, 0.00485290172084, 0.004825687418, 0.00479888642687, 
0.0047724894825, 0.00474648759924, 0.00472087206019, 0.00469563440721, 
0.0046707664313, 0.00464626016347, 0.00462210786599, 0.00459830202398, 
0.00457483533744, 0.00455170071358, 0.00452889125944, 0.00450640027491, 
0.00448422124599, 0.00446234783829, 0.00444077389094, 0.00441949341055, 
0.00439850056563, 0.00437778968106, 0.00435735523287, 0.00433719184324, 
0.00431729427568, 0.00429765743032, 0.00427827633957, 0.00425914616374, 
0.00424026218699, 0.00422161981335, 0.00420321456293, 0.00418504206823, 
0.00416709807067, 0.00414937841715, 0.00413187905682, 0.00411459603791, 
0.00409752550476, 0.00408066369482, 0.00406400693593, 0.00404755164353, 
0.00403129431813, 0.00401523154271, 0.00399935998035, 0.0039836763719, 
0.00396817753363, 0.00395286035516, 0.00393772179728, 0.00392275888994, 
0.0039079687303, 0.00389334848079, 0.00387889536733, 0.00386460667752, 
0.00385047975896, 0.00383651201755, 0.00382270091595, 0.00380904397197, 
0.00379553875712, 0.00378218289514, 0.0037689740606, 0.00375590997756, 
0.00374298841822, 0.00373020720171, 0.00371756419278, 0.00370505730068, 
0.00369268447797, 0.0036804437194, 0.00366833306085, 0.00365635057823, 
0.00364449438653, 0.00363276263877, 0.00362115352509, 0.00360966527178, 
0.00359829614043, 0.00358704442699, 0.00357590846099, 0.00356488660468, 
0.00355397725221, 0.00354317882893, 0.00353248979056, 0.00352190862249, 
0.0035114338391, 0.003501063983, 0.00349079762443, 0.00348063336058, 
0.00347056981496, 0.00346060563678, 0.00345073950037, 0.00344097010457, 
0.0034312961722, 0.0034217164495, 0.00341222970559, 0.00340283473194, 
0.00339353034191, 0.0033843153702, 0.00337518867241, 0.00336614912457, 
0.00335719562268, 0.00334832708229, 0.00333954243803, 0.00333084064323, 
0.0033222206695, 0.00331368150633, 0.00330522216073, 0.00329684165681, 
0.00328853903546, 0.00328031335395, 0.00327216368562, 0.00326408911952, 
0.0032560887601, 0.00324816172687, 0.00324030715409, 0.00323252419046, 
0.00322481199885, 0.00321716975596, 0.00320959665209, 0.00320209189084, 
0.00319465468882, 0.00318728427542, 0.00317997989254, 0.00317274079435, 
0.003165566247, 0.00315845552847, 0.00315140792824, 0.00314442274714, 
0.00313749929707, 0.00313063690082, 0.00312383489187, 0.00311709261413, 
0.00311040942178, 0.00310378467907, 0.00309721776012, 0.00309070804873, 
0.0030842549382, 0.00307785783116, 0.00307151613937, 0.00306522928358, 
0.00305899669333, 0.00305281780682, 0.00304669207072, 0.00304061894004, 
0.00303459787794, 0.00302862835564, 0.00302270985222, 0.00301684185449, 
0.00301102385687, 0.00300525536122, 0.00299953587675, 0.00299386491985, 
0.00298824201399, 0.00298266668956, 0.00297713848379, 0.0029716569406, 
0.00296622161049, 0.00296083205045, 0.00295548782379, 0.0029501885001, 
0.00294493365508, 0.00293972287048, 0.00293455573397, 0.00292943183906, 
0.00292435078497, 0.00291931217657, 0.00291431562426, 0.00290936074389, 
0.00290444715666, 0.00289957448903, 0.00289474237264, 0.00288995044424, 
0.00288519834556, 0.00288048572327, 0.00287581222888, 0.00287117751867, 
0.00286658125362, 0.0028620230993, 0.00285750272584, 0.00285301980783, 
0.00284857402425, 0.00284416505842, 0.00283979259789, 0.00283545633442, 
0.0028311559639, 0.00282689118626, 0.00282266170544, 0.00281846722931, 
0.0028143074696, 0.00281018214188, 0.00280609096544, 0.0028020336633, 
0.00279800996211, 0.00279401959208, 0.00279006228699, 0.00278613778408, 
0.002782245824, 0.0027783861508, 0.00277455851183, 0.00277076265775, 
0.0027669983424, 0.00276326532283, 0.00275956335921, 0.0027558922148, 
0.0027522516559, 0.0027486414518, 0.00274506137476, 0.00274151119993, 
0.00273799070534, 0.00273449967185, 0.00273103788311, 0.0027276051255, 
0.00272420118813, 0.00272082586278, 0.00271747894385, 0.00271416022834, 
0.00271086951583, 0.00270760660839, 0.00270437131062, 0.00270116342955, 
0.00269798277465, 0.00269482915775, 0.00269170239308, 0.00268860229716, 
0.00268552868882, 0.00268248138915, 0.00267946022147, 0.00267646501132, 
0.00267349558638, 0.00267055177652, 0.00266763341369, 0.00266474033195, 
0.00266187236741, 0.00265902935823, 0.00265621114456, 0.00265341756856, 
0.00265064847431, 0.00264790370787, 0.00264518311717, 0.00264248655204, 
0.00263981386418, 0.0026371649071, 0.00263453953616, 0.00263193760848, 
0.00262935898296, 0.00262680352027, 0.00262427108278, 0.00262176153456, 
0.0026192747414, 0.00261681057072, 0.0026143688916, 0.00261194957474, 
0.00260955249246, 0.00260717751864, 0.00260482452874, 0.00260249339979, 
0.00260018401032, 0.00259789624039, 0.00259562997155, 0.00259338508684, 
0.00259116147073, 0.00258895900918, 0.00258677758955, 0.00258461710062, 
0.00258247743256, 0.00258035847693, 0.00257826012666, 0.00257618227603, 
0.00257412482063, 0.0025720876574, 0.00257007068459, 0.00256807380172, 
0.00256609690961, 0.00256413991033, 0.00256220270721, 0.00256028520482, 
0.00255838730896, 0.00255650892663, 0.00255464996603, 0.00255281033657, 
0.00255098994882, 0.00254918871451, 0.00254740654653, 0.00254564335891, 
0.00254389906682, 0.00254217358652, 0.00254046683541, 0.00253877873196, 
0.00253710919574, 0.0025354581474, 0.00253382550864, 0.00253221120222, 
0.00253061515196, 0.0025290372827, 0.0025274775203, 0.00252593579165, 
0.00252441202465, 0.00252290614818, 0.00252141809212, 0.00251994778733, 
0.00251849516564, 0.00251706015984, 0.00251564270368, 0.00251424273186, 
0.00251286018, 0.00251149498467, 0.00251014708335, 0.00250881641443, 
0.00250750291723, 0.00250620653194, 0.00250492719967, 0.00250366486239, 
0.00250241946296, 0.00250119094512, 0.00249997925346, 0.00249878433343, 
0.00249760613134, 0.00249644459433, 0.00249529967039, 0.00249417130834, 
0.00249305945782, 0.00249196406929, 0.00249088509404, 0.00248982248416, 
0.00248877619252, 0.00248774617282, 0.00248673237953, 0.00248573476793, 
0.00248475329404, 0.00248378791471, 0.00248283858751, 0.00248190527081, 
0.00248098792373, 0.00248008650614, 0.00247920097867, 0.00247833130269, 
0.00247747744033, 0.00247663935445, 0.00247581700862, 0.00247501036718, 
0.00247421939516, 0.00247344405835, 0.00247268432322, 0.00247194015697, 
0.00247121152753, 0.0024704984035, 0.00246980075421, 0.00246911854969, 
0.00246845176065, 0.00246780035849, 0.00246716431534, 0.00246654360397, 
0.00246593819785, 0.00246534807115, 0.00246477319868, 0.00246421355597, 
0.00246366911919, 0.00246313986518, 0.00246262577147, 0.00246212681623, 
0.00246164297832, 0.00246117423723, 0.00246072057312, 0.00246028196681, 
0.00245985839977, 0.00245944985413, 0.00245905631265, 0.00245867775876, 
0.00245831417651, 0.00245796555061, 0.00245763186643, 0.00245731310994, 
0.00245700926777, 0.0024567203272, 0.00245644627613, 0.0024561871031, 
0.00245594279728, 0.00245571334848, 0.00245549874713, 0.0024552989843, 
0.00245511405169, 0.00245494394162, 0.00245478864704, 0.00245464816154, 
0.00245452247932, 0.00245441159521, 0.00245431550467, 0.00245423420378, 
0.00245416768924, 0.00245411595839, 0.00245407900917, 0.00245405684016, 
0.00245404945057, 0.00245404945057, 0.00245405684016, 0.00245407900917, 
0.00245411595839, 0.00245416768924, 0.00245423420378, 0.00245431550467, 
0.00245441159521, 0.00245452247932, 0.00245464816154, 0.00245478864704, 
0.00245494394162, 0.00245511405169, 0.0024552989843, 0.00245549874713, 
0.00245571334848, 0.00245594279728, 0.0024561871031, 0.00245644627613, 
0.0024567203272, 0.00245700926777, 0.00245731310994, 0.00245763186643, 
0.00245796555061, 0.00245831417651, 0.00245867775876, 0.00245905631265, 
0.00245944985413, 0.00245985839977, 0.00246028196681, 0.00246072057312, 
0.00246117423723, 0.00246164297832, 0.00246212681623, 0.00246262577147, 
0.00246313986518, 0.00246366911919, 0.00246421355597, 0.00246477319868, 
0.00246534807115, 0.00246593819785, 0.00246654360397, 0.00246716431534, 
0.00246780035849, 0.00246845176065, 0.00246911854969, 0.00246980075421, 
0.0024704984035, 0.00247121152753, 0.00247194015697, 0.00247268432322, 
0.00247344405835, 0.00247421939516, 0.00247501036718, 0.00247581700862, 
0.00247663935445, 0.00247747744033, 0.00247833130269, 0.00247920097867, 
0.00248008650614, 0.00248098792373, 0.00248190527081, 0.00248283858751, 
0.00248378791471, 0.00248475329404, 0.00248573476793, 0.00248673237953, 
0.00248774617282, 0.00248877619252, 0.00248982248416, 0.00249088509404, 
0.00249196406929, 0.00249305945782, 0.00249417130834, 0.00249529967039, 
0.00249644459433, 0.00249760613134, 0.00249878433343, 0.00249997925346, 
0.00250119094512, 0.00250241946296, 0.00250366486239, 0.00250492719967, 
0.00250620653194, 0.00250750291723, 0.00250881641443, 0.00251014708335, 
0.00251149498467, 0.00251286018, 0.00251424273186, 0.00251564270368, 
0.00251706015984, 0.00251849516564, 0.00251994778733, 0.00252141809212, 
0.00252290614818, 0.00252441202465, 0.00252593579165, 0.0025274775203, 
0.0025290372827, 0.00253061515196, 0.00253221120222, 0.00253382550864, 
0.0025354581474, 0.00253710919574, 0.00253877873196, 0.00254046683541, 
0.00254217358652, 0.00254389906682, 0.00254564335891, 0.00254740654653, 
0.00254918871451, 0.00255098994882, 0.00255281033657, 0.00255464996603, 
0.00255650892663, 0.00255838730896, 0.00256028520482, 0.00256220270721, 
0.00256413991033, 0.00256609690961, 0.00256807380172, 0.00257007068459, 
0.0025720876574, 0.00257412482063, 0.00257618227603, 0.00257826012666, 
0.00258035847693, 0.00258247743256, 0.00258461710062, 0.00258677758955, 
0.00258895900918, 0.00259116147073, 0.00259338508684, 0.00259562997155, 
0.00259789624039, 0.00260018401032, 0.00260249339979, 0.00260482452874, 
0.00260717751864, 0.00260955249246, 0.00261194957474, 0.0026143688916, 
0.00261681057072, 0.0026192747414, 0.00262176153456, 0.00262427108278, 
0.00262680352027, 0.00262935898296, 0.00263193760848, 0.00263453953616, 
0.0026371649071, 0.00263981386418, 0.00264248655204, 0.00264518311717, 
0.00264790370787, 0.00265064847431, 0.00265341756856, 0.00265621114456, 
0.00265902935823, 0.00266187236741, 0.00266474033195, 0.00266763341369, 
0.00267055177652, 0.00267349558638, 0.00267646501132, 0.00267946022147, 
0.00268248138915, 0.00268552868882, 0.00268860229716, 0.00269170239308, 
0.00269482915775, 0.00269798277465, 0.00270116342955, 0.00270437131062, 
0.00270760660839, 0.00271086951583, 0.00271416022834, 0.00271747894385, 
0.00272082586278, 0.00272420118813, 0.0027276051255, 0.00273103788311, 
0.00273449967185, 0.00273799070534, 0.00274151119993, 0.00274506137476, 
0.0027486414518, 0.0027522516559, 0.0027558922148, 0.00275956335921, 
0.00276326532283, 0.0027669983424, 0.00277076265775, 0.00277455851183, 
0.0027783861508, 0.002782245824, 0.00278613778408, 0.00279006228699, 
0.00279401959208, 0.00279800996211, 0.0028020336633, 0.00280609096544, 
0.00281018214188, 0.0028143074696, 0.00281846722931, 0.00282266170544, 
0.00282689118626, 0.0028311559639, 0.00283545633442, 0.00283979259789, 
0.00284416505842, 0.00284857402425, 0.00285301980783, 0.00285750272584, 
0.0028620230993, 0.00286658125362, 0.00287117751867, 0.00287581222888, 
0.00288048572327, 0.00288519834556, 0.00288995044424, 0.00289474237264, 
0.00289957448903, 0.00290444715666, 0.00290936074389, 0.00291431562426, 
0.00291931217657, 0.00292435078497, 0.00292943183906, 0.00293455573397, 
0.00293972287048, 0.00294493365508, 0.0029501885001, 0.00295548782379, 
0.00296083205045, 0.00296622161049, 0.0029716569406, 0.00297713848379, 
0.00298266668956, 0.00298824201399, 0.00299386491985, 0.00299953587675, 
0.00300525536122, 0.00301102385687, 0.00301684185449, 0.00302270985222, 
0.00302862835564, 0.00303459787794, 0.00304061894004, 0.00304669207072, 
0.00305281780682, 0.00305899669333, 0.00306522928358, 0.00307151613937, 
0.00307785783116, 0.0030842549382, 0.00309070804873, 0.00309721776012, 
0.00310378467907, 0.00311040942178, 0.00311709261413, 0.00312383489187, 
0.00313063690082, 0.00313749929707, 0.00314442274714, 0.00315140792824, 
0.00315845552847, 0.003165566247, 0.00317274079435, 0.00317997989254, 
0.00318728427542, 0.00319465468882, 0.00320209189084, 0.00320959665209, 
0.00321716975596, 0.00322481199885, 0.00323252419046, 0.00324030715409, 
0.00324816172687, 0.0032560887601, 0.00326408911952, 0.00327216368562, 
0.00328031335395, 0.00328853903546, 0.00329684165681, 0.00330522216073, 
0.00331368150633, 0.0033222206695, 0.00333084064323, 0.00333954243803, 
0.00334832708229, 0.00335719562268, 0.00336614912457, 0.00337518867241, 
0.0033843153702, 0.00339353034191, 0.00340283473194, 0.00341222970559, 
0.0034217164495, 0.0034312961722, 0.00344097010457, 0.00345073950037, 
0.00346060563678, 0.00347056981496, 0.00348063336058, 0.00349079762443, 
0.003501063983, 0.0035114338391, 0.00352190862249, 0.00353248979056, 
0.00354317882893, 0.00355397725221, 0.00356488660468, 0.00357590846099, 
0.00358704442699, 0.00359829614043, 0.00360966527178, 0.00362115352509, 
0.00363276263877, 0.00364449438653, 0.00365635057823, 0.00366833306085, 
0.0036804437194, 0.00369268447797, 0.00370505730068, 0.00371756419278, 
0.00373020720171, 0.00374298841822, 0.00375590997756, 0.0037689740606, 
0.00378218289514, 0.00379553875712, 0.00380904397197, 0.00382270091595, 
0.00383651201755, 0.00385047975896, 0.00386460667752, 0.00387889536733, 
0.00389334848079, 0.0039079687303, 0.00392275888994, 0.00393772179728, 
0.00395286035516, 0.00396817753363, 0.0039836763719, 0.00399935998035, 
0.00401523154271, 0.00403129431813, 0.00404755164353, 0.00406400693593, 
0.00408066369482, 0.00409752550476, 0.00411459603791, 0.00413187905682, 
0.00414937841715, 0.00416709807067, 0.00418504206823, 0.00420321456293, 
0.00422161981335, 0.00424026218699, 0.00425914616374, 0.00427827633957, 
0.00429765743032, 0.00431729427568, 0.00433719184324, 0.00435735523287, 
0.00437778968106, 0.00439850056563, 0.00441949341055, 0.00444077389094, 
0.00446234783829, 0.00448422124599, 0.00450640027491, 0.00452889125944, 
0.00455170071358, 0.00457483533744, 0.00459830202398, 0.00462210786599, 
0.00464626016347, 0.0046707664313, 0.00469563440721, 0.00472087206019, 
0.00474648759924, 0.0047724894825, 0.00479888642687, 0.004825687418, 
0.00485290172084, 0.00488053889059, 0.00490860878426, 0.00493712157271, 
0.0049660877534, 0.00499551816357, 0.0050254239943, 0.00505581680506, 
0.00508670853916, 0.00511811153984, 0.00515003856735, 0.0051825028167, 
0.00521551793655, 0.00524909804895, 0.00528325777014, 0.00531801223257, 
0.00535337710794, 0.00538936863164, 0.00542600362848, 0.00546329953981, 
0.00550127445222, 0.00553994712784, 0.00557933703637, 0.00561946438893, 
0.00566035017395, 0.00570201619508, 0.00574448511146, 0.00578778048027, 
0.00583192680202, 0.00587694956847, 0.00592287531359, 0.00596973166772, 
0.00601754741511, 0.00606635255513, 0.00611617836754, 0.00616705748185, 
0.00621902395142, 0.00627211333242, 0.00632636276817, 0.0063818110792, 
0.00643849885959, 0.00649646858, 0.00655576469802, 0.00661643377646, 
0.00667852461013, 0.00674208836205, 0.00680717870968, 0.00687385200222, 
0.00694216742992, 0.00701218720645, 0.00708397676554, 0.00715760497323, 
0.00723314435726, 0.00731067135505, 0.00739026658226, 0.00747201512386, 
0.00755600684996, 0.00764233675886, 0.00773110535018, 0.00782241903117, 
0.00791639055964, 0.00801313952753, 0.00811279288945, 0.00821548554127, 
0.0083213609542, 0.00843057187095, 0.00854328107092, 0.00865966221277, 
0.00877990076353, 0.00890419502489, 0.00903275726874, 0.00916581499586, 
0.0093036123335, 0.00944641159029, 0.00959449498944, 0.00974816660466, 
0.00990775452699, 0.0100736132955, 0.01024612663, 0.0104257105107, 
0.0106128166574, 0.0108079364702, 0.0110116055039, 0.0112244085649, 
0.0114469855311, 0.0116800380194, 0.0119243370492, 0.0121807318777, 
0.0124501602242, 0.012733660144, 0.0130323838716, 0.0133476140258, 
0.0136807826608, 0.0140334937645, 0.014407549955, 0.0148049843196, 
0.0152280985912, 0.0156795091842, 0.0161622030474, 0.0166796058657, 
0.0172356659199, 0.0178349579653, 0.0184828129377, 0.0191854812998, 
0.0199503406664, 0.0207861623673, 0.0217034574277, 0.0227149309883, 
0.0238360869648, 0.0250860442037, 0.0264886556456, 0.0280740701458, 
0.0298809551583, 0.0319597303634, 0.0343773908907, 0.0372249094776, 
0.0406289759049, 0.0447713420972, 0.0499221758639, 0.0565007755978, 
0.0651936762094, 0.0772043086972, 0.0948405347884, 0.123112145767, 
0.175069626484};

static const double delta[1001]={
0.0184828129377, 0.0178349579653, 0.0172356659199, 0.0166796058657, 
0.0161622030474, 0.0156795091842, 0.0152280985912, 0.0148049843196, 
0.014407549955, 0.0140334937645, 0.0136807826608, 0.0133476140258, 
0.0130323838716, 0.012733660144, 0.0124501602242, 0.0121807318777, 
0.0119243370492, 0.0116800380194, 0.0114469855311, 0.0112244085649, 
0.0110116055039, 0.0108079364702, 0.0106128166574, 0.0104257105107, 
0.01024612663, 0.0100736132955, 0.00990775452699, 0.00974816660466, 
0.00959449498944, 0.00944641159029, 0.0093036123335, 0.00916581499586, 
0.00903275726874, 0.00890419502489, 0.00877990076353, 0.00865966221277, 
0.00854328107092, 0.00843057187095, 0.0083213609542, 0.00821548554127, 
0.00811279288945, 0.00801313952753, 0.00791639055964, 0.00782241903117, 
0.00773110535018, 0.00764233675886, 0.00755600684996, 0.00747201512386, 
0.00739026658226, 0.00731067135505, 0.00723314435726, 0.00715760497323, 
0.00708397676554, 0.00701218720645, 0.00694216742992, 0.00687385200222, 
0.00680717870968, 0.00674208836205, 0.00667852461013, 0.00661643377646, 
0.00655576469802, 0.00649646858, 0.00643849885959, 0.0063818110792, 
0.00632636276817, 0.00627211333242, 0.00621902395142, 0.00616705748185, 
0.00611617836754, 0.00606635255513, 0.00601754741511, 0.00596973166772, 
0.00592287531359, 0.00587694956847, 0.00583192680202, 0.00578778048027, 
0.00574448511146, 0.00570201619508, 0.00566035017395, 0.00561946438893, 
0.00557933703637, 0.00553994712784, 0.00550127445222, 0.00546329953981, 
0.00542600362848, 0.00538936863164, 0.00535337710794, 0.00531801223257, 
0.00528325777014, 0.00524909804895, 0.00521551793655, 0.0051825028167, 
0.00515003856735, 0.00511811153984, 0.00508670853916, 0.00505581680506, 
0.0050254239943, 0.00499551816357, 0.0049660877534, 0.00493712157271, 
0.00490860878426, 0.00488053889059, 0.00485290172084, 0.004825687418, 
0.00479888642687, 0.0047724894825, 0.00474648759924, 0.00472087206019, 
0.00469563440721, 0.0046707664313, 0.00464626016347, 0.00462210786599, 
0.00459830202398, 0.00457483533744, 0.00455170071358, 0.00452889125944, 
0.00450640027491, 0.00448422124599, 0.00446234783829, 0.00444077389094, 
0.00441949341055, 0.00439850056563, 0.00437778968106, 0.00435735523287, 
0.00433719184324, 0.00431729427568, 0.00429765743032, 0.00427827633957, 
0.00425914616374, 0.00424026218699, 0.00422161981335, 0.00420321456293, 
0.00418504206823, 0.00416709807067, 0.00414937841715, 0.00413187905682, 
0.00411459603791, 0.00409752550476, 0.00408066369482, 0.00406400693593, 
0.00404755164353, 0.00403129431813, 0.00401523154271, 0.00399935998035, 
0.0039836763719, 0.00396817753363, 0.00395286035516, 0.00393772179728, 
0.00392275888994, 0.0039079687303, 0.00389334848079, 0.00387889536733, 
0.00386460667752, 0.00385047975896, 0.00383651201755, 0.00382270091595, 
0.00380904397197, 0.00379553875712, 0.00378218289514, 0.0037689740606, 
0.00375590997756, 0.00374298841822, 0.00373020720171, 0.00371756419278, 
0.00370505730068, 0.00369268447797, 0.0036804437194, 0.00366833306085, 
0.00365635057823, 0.00364449438653, 0.00363276263877, 0.00362115352509, 
0.00360966527178, 0.00359829614043, 0.00358704442699, 0.00357590846099, 
0.00356488660468, 0.00355397725221, 0.00354317882893, 0.00353248979056, 
0.00352190862249, 0.0035114338391, 0.003501063983, 0.00349079762443, 
0.00348063336058, 0.00347056981496, 0.00346060563678, 0.00345073950037, 
0.00344097010457, 0.0034312961722, 0.0034217164495, 0.00341222970559, 
0.00340283473194, 0.00339353034191, 0.0033843153702, 0.00337518867241, 
0.00336614912457, 0.00335719562268, 0.00334832708229, 0.00333954243803, 
0.00333084064323, 0.0033222206695, 0.00331368150633, 0.00330522216073, 
0.00329684165682, 0.00328853903546, 0.00328031335395, 0.00327216368562, 
0.00326408911952, 0.0032560887601, 0.00324816172687, 0.00324030715409, 
0.00323252419046, 0.00322481199885, 0.00321716975596, 0.00320959665209, 
0.00320209189084, 0.00319465468882, 0.00318728427542, 0.00317997989254, 
0.00317274079435, 0.003165566247, 0.00315845552847, 0.00315140792824, 
0.00314442274714, 0.00313749929707, 0.00313063690082, 0.00312383489187, 
0.00311709261413, 0.00311040942178, 0.00310378467907, 0.00309721776012, 
0.00309070804873, 0.0030842549382, 0.00307785783116, 0.00307151613937, 
0.00306522928358, 0.00305899669333, 0.00305281780682, 0.00304669207072, 
0.00304061894004, 0.00303459787794, 0.00302862835564, 0.00302270985222, 
0.00301684185449, 0.00301102385687, 0.00300525536122, 0.00299953587675, 
0.00299386491985, 0.00298824201399, 0.00298266668956, 0.00297713848379, 
0.0029716569406, 0.00296622161049, 0.00296083205045, 0.00295548782379, 
0.0029501885001, 0.00294493365508, 0.00293972287048, 0.00293455573397, 
0.00292943183906, 0.00292435078497, 0.00291931217657, 0.00291431562426, 
0.00290936074389, 0.00290444715666, 0.00289957448903, 0.00289474237264, 
0.00288995044424, 0.00288519834556, 0.00288048572327, 0.00287581222888, 
0.00287117751867, 0.00286658125362, 0.0028620230993, 0.00285750272584, 
0.00285301980783, 0.00284857402425, 0.00284416505842, 0.00283979259789, 
0.00283545633442, 0.0028311559639, 0.00282689118626, 0.00282266170544, 
0.00281846722931, 0.0028143074696, 0.00281018214188, 0.00280609096544, 
0.0028020336633, 0.00279800996211, 0.00279401959208, 0.00279006228699, 
0.00278613778408, 0.002782245824, 0.0027783861508, 0.00277455851183, 
0.00277076265775, 0.0027669983424, 0.00276326532283, 0.00275956335921, 
0.0027558922148, 0.0027522516559, 0.0027486414518, 0.00274506137476, 
0.00274151119993, 0.00273799070534, 0.00273449967185, 0.00273103788311, 
0.0027276051255, 0.00272420118813, 0.00272082586278, 0.00271747894385, 
0.00271416022834, 0.00271086951583, 0.00270760660839, 0.00270437131062, 
0.00270116342955, 0.00269798277465, 0.00269482915775, 0.00269170239308, 
0.00268860229716, 0.00268552868882, 0.00268248138915, 0.00267946022147, 
0.00267646501132, 0.00267349558638, 0.00267055177652, 0.00266763341369, 
0.00266474033195, 0.00266187236741, 0.00265902935823, 0.00265621114456, 
0.00265341756856, 0.00265064847431, 0.00264790370787, 0.00264518311717, 
0.00264248655204, 0.00263981386418, 0.0026371649071, 0.00263453953616, 
0.00263193760848, 0.00262935898296, 0.00262680352027, 0.00262427108278, 
0.00262176153456, 0.0026192747414, 0.00261681057072, 0.0026143688916, 
0.00261194957474, 0.00260955249246, 0.00260717751864, 0.00260482452874, 
0.00260249339979, 0.00260018401032, 0.00259789624039, 0.00259562997155, 
0.00259338508684, 0.00259116147073, 0.00258895900918, 0.00258677758955, 
0.00258461710062, 0.00258247743256, 0.00258035847693, 0.00257826012666, 
0.00257618227603, 0.00257412482063, 0.0025720876574, 0.00257007068459, 
0.00256807380172, 0.00256609690961, 0.00256413991033, 0.00256220270721, 
0.00256028520482, 0.00255838730896, 0.00255650892663, 0.00255464996603, 
0.00255281033657, 0.00255098994882, 0.00254918871451, 0.00254740654653, 
0.00254564335891, 0.00254389906682, 0.00254217358652, 0.00254046683541, 
0.00253877873196, 0.00253710919574, 0.0025354581474, 0.00253382550864, 
0.00253221120222, 0.00253061515196, 0.0025290372827, 0.0025274775203, 
0.00252593579165, 0.00252441202465, 0.00252290614818, 0.00252141809212, 
0.00251994778733, 0.00251849516564, 0.00251706015984, 0.00251564270368, 
0.00251424273186, 0.00251286018, 0.00251149498467, 0.00251014708335, 
0.00250881641443, 0.00250750291723, 0.00250620653194, 0.00250492719967, 
0.00250366486239, 0.00250241946296, 0.00250119094512, 0.00249997925346, 
0.00249878433343, 0.00249760613134, 0.00249644459433, 0.00249529967039, 
0.00249417130834, 0.00249305945782, 0.00249196406929, 0.00249088509404, 
0.00248982248416, 0.00248877619252, 0.00248774617282, 0.00248673237953, 
0.00248573476793, 0.00248475329404, 0.00248378791471, 0.00248283858751, 
0.00248190527081, 0.00248098792373, 0.00248008650614, 0.00247920097867, 
0.00247833130269, 0.00247747744033, 0.00247663935445, 0.00247581700862, 
0.00247501036718, 0.00247421939516, 0.00247344405835, 0.00247268432322, 
0.00247194015697, 0.00247121152753, 0.0024704984035, 0.00246980075421, 
0.00246911854969, 0.00246845176065, 0.00246780035849, 0.00246716431534, 
0.00246654360397, 0.00246593819785, 0.00246534807115, 0.00246477319868, 
0.00246421355597, 0.00246366911919, 0.00246313986518, 0.00246262577147, 
0.00246212681623, 0.00246164297832, 0.00246117423723, 0.00246072057312, 
0.00246028196681, 0.00245985839977, 0.00245944985413, 0.00245905631265, 
0.00245867775876, 0.00245831417651, 0.00245796555061, 0.00245763186643, 
0.00245731310994, 0.00245700926777, 0.0024567203272, 0.00245644627613, 
0.0024561871031, 0.00245594279728, 0.00245571334848, 0.00245549874713, 
0.0024552989843, 0.00245511405169, 0.00245494394162, 0.00245478864704, 
0.00245464816154, 0.00245452247932, 0.00245441159521, 0.00245431550467, 
0.00245423420378, 0.00245416768924, 0.00245411595839, 0.00245407900917, 
0.00245405684016, 0.00245405684016, 0.00245407900917, 0.00245411595839, 
0.00245416768924, 0.00245423420378, 0.00245431550467, 0.00245441159521, 
0.00245452247932, 0.00245464816154, 0.00245478864704, 0.00245494394162, 
0.00245511405169, 0.0024552989843, 0.00245549874713, 0.00245571334848, 
0.00245594279728, 0.0024561871031, 0.00245644627613, 0.0024567203272, 
0.00245700926777, 0.00245731310994, 0.00245763186643, 0.00245796555061, 
0.00245831417651, 0.00245867775876, 0.00245905631265, 0.00245944985413, 
0.00245985839977, 0.00246028196681, 0.00246072057312, 0.00246117423723, 
0.00246164297832, 0.00246212681623, 0.00246262577147, 0.00246313986518, 
0.00246366911919, 0.00246421355597, 0.00246477319868, 0.00246534807115, 
0.00246593819785, 0.00246654360397, 0.00246716431534, 0.00246780035849, 
0.00246845176065, 0.00246911854969, 0.00246980075421, 0.0024704984035, 
0.00247121152753, 0.00247194015697, 0.00247268432322, 0.00247344405835, 
0.00247421939516, 0.00247501036718, 0.00247581700862, 0.00247663935445, 
0.00247747744033, 0.00247833130269, 0.00247920097867, 0.00248008650614, 
0.00248098792373, 0.00248190527081, 0.00248283858751, 0.00248378791471, 
0.00248475329404, 0.00248573476793, 0.00248673237953, 0.00248774617282, 
0.00248877619252, 0.00248982248416, 0.00249088509404, 0.00249196406929, 
0.00249305945782, 0.00249417130834, 0.00249529967039, 0.00249644459433, 
0.00249760613134, 0.00249878433343, 0.00249997925346, 0.00250119094512, 
0.00250241946296, 0.00250366486239, 0.00250492719967, 0.00250620653194, 
0.00250750291723, 0.00250881641443, 0.00251014708335, 0.00251149498467, 
0.00251286018, 0.00251424273186, 0.00251564270368, 0.00251706015984, 
0.00251849516564, 0.00251994778733, 0.00252141809212, 0.00252290614818, 
0.00252441202465, 0.00252593579165, 0.0025274775203, 0.0025290372827, 
0.00253061515196, 0.00253221120222, 0.00253382550864, 0.0025354581474, 
0.00253710919574, 0.00253877873196, 0.00254046683541, 0.00254217358652, 
0.00254389906682, 0.00254564335891, 0.00254740654653, 0.00254918871451, 
0.00255098994882, 0.00255281033657, 0.00255464996603, 0.00255650892663, 
0.00255838730896, 0.00256028520482, 0.00256220270721, 0.00256413991033, 
0.00256609690961, 0.00256807380172, 0.00257007068459, 0.0025720876574, 
0.00257412482063, 0.00257618227603, 0.00257826012666, 0.00258035847693, 
0.00258247743256, 0.00258461710062, 0.00258677758955, 0.00258895900918, 
0.00259116147073, 0.00259338508684, 0.00259562997155, 0.00259789624039, 
0.00260018401032, 0.00260249339979, 0.00260482452874, 0.00260717751864, 
0.00260955249246, 0.00261194957474, 0.0026143688916, 0.00261681057072, 
0.0026192747414, 0.00262176153456, 0.00262427108278, 0.00262680352027, 
0.00262935898296, 0.00263193760848, 0.00263453953616, 0.0026371649071, 
0.00263981386418, 0.00264248655204, 0.00264518311717, 0.00264790370787, 
0.00265064847431, 0.00265341756856, 0.00265621114456, 0.00265902935823, 
0.00266187236741, 0.00266474033195, 0.00266763341369, 0.00267055177652, 
0.00267349558638, 0.00267646501132, 0.00267946022147, 0.00268248138915, 
0.00268552868882, 0.00268860229716, 0.00269170239308, 0.00269482915775, 
0.00269798277465, 0.00270116342955, 0.00270437131062, 0.00270760660839, 
0.00271086951583, 0.00271416022834, 0.00271747894385, 0.00272082586278, 
0.00272420118813, 0.0027276051255, 0.00273103788311, 0.00273449967185, 
0.00273799070534, 0.00274151119993, 0.00274506137476, 0.0027486414518, 
0.0027522516559, 0.0027558922148, 0.00275956335921, 0.00276326532283, 
0.0027669983424, 0.00277076265775, 0.00277455851183, 0.0027783861508, 
0.002782245824, 0.00278613778408, 0.00279006228699, 0.00279401959208, 
0.00279800996211, 0.0028020336633, 0.00280609096544, 0.00281018214188, 
0.0028143074696, 0.00281846722931, 0.00282266170544, 0.00282689118626, 
0.0028311559639, 0.00283545633442, 0.00283979259789, 0.00284416505842, 
0.00284857402425, 0.00285301980783, 0.00285750272584, 0.0028620230993, 
0.00286658125362, 0.00287117751867, 0.00287581222888, 0.00288048572327, 
0.00288519834556, 0.00288995044424, 0.00289474237264, 0.00289957448903, 
0.00290444715666, 0.00290936074389, 0.00291431562426, 0.00291931217657, 
0.00292435078497, 0.00292943183906, 0.00293455573397, 0.00293972287048, 
0.00294493365508, 0.0029501885001, 0.00295548782379, 0.00296083205045, 
0.00296622161049, 0.0029716569406, 0.00297713848379, 0.00298266668956, 
0.00298824201399, 0.00299386491985, 0.00299953587675, 0.00300525536122, 
0.00301102385687, 0.00301684185449, 0.00302270985222, 0.00302862835564, 
0.00303459787794, 0.00304061894004, 0.00304669207072, 0.00305281780682, 
0.00305899669333, 0.00306522928358, 0.00307151613937, 0.00307785783116, 
0.0030842549382, 0.00309070804873, 0.00309721776012, 0.00310378467907, 
0.00311040942178, 0.00311709261413, 0.00312383489187, 0.00313063690082, 
0.00313749929707, 0.00314442274714, 0.00315140792824, 0.00315845552847, 
0.003165566247, 0.00317274079435, 0.00317997989254, 0.00318728427542, 
0.00319465468882, 0.00320209189084, 0.00320959665209, 0.00321716975596, 
0.00322481199885, 0.00323252419046, 0.00324030715409, 0.00324816172687, 
0.0032560887601, 0.00326408911952, 0.00327216368562, 0.00328031335395, 
0.00328853903546, 0.00329684165682, 0.00330522216073, 0.00331368150633, 
0.0033222206695, 0.00333084064323, 0.00333954243803, 0.00334832708229, 
0.00335719562268, 0.00336614912457, 0.00337518867241, 0.0033843153702, 
0.00339353034191, 0.00340283473194, 0.00341222970559, 0.0034217164495, 
0.0034312961722, 0.00344097010457, 0.00345073950037, 0.00346060563678, 
0.00347056981496, 0.00348063336058, 0.00349079762443, 0.003501063983, 
0.0035114338391, 0.00352190862249, 0.00353248979056, 0.00354317882893, 
0.00355397725221, 0.00356488660468, 0.00357590846099, 0.00358704442699, 
0.00359829614043, 0.00360966527178, 0.00362115352509, 0.00363276263877, 
0.00364449438653, 0.00365635057823, 0.00366833306085, 0.0036804437194, 
0.00369268447797, 0.00370505730068, 0.00371756419278, 0.00373020720171, 
0.00374298841822, 0.00375590997756, 0.0037689740606, 0.00378218289514, 
0.00379553875712, 0.00380904397197, 0.00382270091595, 0.00383651201755, 
0.00385047975896, 0.00386460667752, 0.00387889536733, 0.00389334848079, 
0.0039079687303, 0.00392275888994, 0.00393772179728, 0.00395286035516, 
0.00396817753363, 0.0039836763719, 0.00399935998035, 0.00401523154271, 
0.00403129431813, 0.00404755164353, 0.00406400693593, 0.00408066369482, 
0.00409752550476, 0.00411459603791, 0.00413187905682, 0.00414937841715, 
0.00416709807067, 0.00418504206823, 0.00420321456293, 0.00422161981335, 
0.00424026218699, 0.00425914616374, 0.00427827633957, 0.00429765743032, 
0.00431729427568, 0.00433719184324, 0.00435735523287, 0.00437778968106, 
0.00439850056563, 0.00441949341055, 0.00444077389094, 0.00446234783829, 
0.00448422124599, 0.00450640027491, 0.00452889125944, 0.00455170071358, 
0.00457483533744, 0.00459830202398, 0.00462210786599, 0.00464626016347, 
0.0046707664313, 0.00469563440721, 0.00472087206019, 0.00474648759924, 
0.0047724894825, 0.00479888642687, 0.004825687418, 0.00485290172084, 
0.00488053889059, 0.00490860878426, 0.00493712157271, 0.0049660877534, 
0.00499551816357, 0.0050254239943, 0.00505581680506, 0.00508670853916, 
0.00511811153984, 0.00515003856735, 0.0051825028167, 0.00521551793655, 
0.00524909804895, 0.00528325777014, 0.00531801223257, 0.00535337710794, 
0.00538936863164, 0.00542600362848, 0.00546329953981, 0.00550127445222, 
0.00553994712784, 0.00557933703637, 0.00561946438893, 0.00566035017395, 
0.00570201619508, 0.00574448511146, 0.00578778048027, 0.00583192680202, 
0.00587694956847, 0.00592287531359, 0.00596973166772, 0.00601754741511, 
0.00606635255513, 0.00611617836754, 0.00616705748185, 0.00621902395142, 
0.00627211333242, 0.00632636276817, 0.0063818110792, 0.00643849885959, 
0.00649646858, 0.00655576469802, 0.00661643377646, 0.00667852461013, 
0.00674208836205, 0.00680717870968, 0.00687385200222, 0.00694216742992, 
0.00701218720645, 0.00708397676554, 0.00715760497323, 0.00723314435726, 
0.00731067135505, 0.00739026658226, 0.00747201512386, 0.00755600684996, 
0.00764233675886, 0.00773110535018, 0.00782241903117, 0.00791639055964, 
0.00801313952753, 0.00811279288945, 0.00821548554127, 0.0083213609542, 
0.00843057187095, 0.00854328107092, 0.00865966221277, 0.00877990076353, 
0.00890419502489, 0.00903275726874, 0.00916581499586, 0.0093036123335, 
0.00944641159029, 0.00959449498944, 0.00974816660466, 0.00990775452699, 
0.0100736132955, 0.01024612663, 0.0104257105107, 0.0106128166574, 
0.0108079364702, 0.0110116055039, 0.0112244085649, 0.0114469855311, 
0.0116800380194, 0.0119243370492, 0.0121807318777, 0.0124501602242, 
0.012733660144, 0.0130323838716, 0.0133476140258, 0.0136807826608, 
0.0140334937645, 0.014407549955, 0.0148049843196, 0.0152280985912, 
0.0156795091842, 0.0161622030474, 0.0166796058657, 0.0172356659199, 
0.0178349579653, 0.0184828129377, 0.0191854812998, 0.0199503406664, 
0.0207861623673, 0.0217034574277, 0.0227149309883, 0.0238360869648, 
0.0250860442037, 0.0264886556456, 0.0280740701458, 0.0298809551583, 
0.0319597303634, 0.0343773908907, 0.0372249094776, 0.0406289759049, 
0.0447713420972, 0.0499221758639, 0.0565007755978, 0.0651936762094, 
0.0772043086972, 0.0948405347884, 0.123112145767, 0.175069626484, 
0.29647596709};

static const unsigned short int ncell[1670]={
0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 
2, 2, 3, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 4, 4, 5, 5, 5, 5, 5, 
5, 6, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 7, 8, 8, 8, 8, 8, 8, 9, 
9, 9, 9, 9, 10, 10, 10, 10, 10, 10, 11, 11, 11, 11, 11, 12, 12, 12, 12, 12, 
13, 13, 13, 13, 13, 14, 14, 14, 14, 14, 15, 15, 15, 15, 15, 16, 16, 16, 16, 16, 
17, 17, 17, 17, 18, 18, 18, 18, 18, 19, 19, 19, 19, 20, 20, 20, 20, 20, 21, 21, 
21, 21, 22, 22, 22, 22, 23, 23, 23, 23, 23, 24, 24, 24, 24, 25, 25, 25, 25, 26, 
26, 26, 26, 27, 27, 27, 27, 28, 28, 28, 29, 29, 29, 29, 30, 30, 30, 30, 31, 31, 
31, 31, 32, 32, 32, 33, 33, 33, 33, 34, 34, 34, 35, 35, 35, 35, 36, 36, 36, 37, 
37, 37, 37, 38, 38, 38, 39, 39, 39, 40, 40, 40, 40, 41, 41, 41, 42, 42, 42, 43, 
43, 43, 44, 44, 44, 45, 45, 45, 46, 46, 46, 47, 47, 47, 48, 48, 48, 49, 49, 49, 
50, 50, 50, 51, 51, 51, 52, 52, 52, 53, 53, 53, 54, 54, 54, 55, 55, 56, 56, 56, 
57, 57, 57, 58, 58, 58, 59, 59, 60, 60, 60, 61, 61, 61, 62, 62, 63, 63, 63, 64, 
64, 65, 65, 65, 66, 66, 67, 67, 67, 68, 68, 69, 69, 69, 70, 70, 71, 71, 71, 72, 
72, 73, 73, 74, 74, 74, 75, 75, 76, 76, 77, 77, 77, 78, 78, 79, 79, 80, 80, 81, 
81, 81, 82, 82, 83, 83, 84, 84, 85, 85, 85, 86, 86, 87, 87, 88, 88, 89, 89, 90, 
90, 91, 91, 92, 92, 93, 93, 93, 94, 94, 95, 95, 96, 96, 97, 97, 98, 98, 99, 99, 
100, 100, 101, 101, 102, 102, 103, 103, 104, 104, 105, 106, 106, 107, 107, 108, 108, 109, 109, 110, 
110, 111, 111, 112, 112, 113, 113, 114, 115, 115, 116, 116, 117, 117, 118, 118, 119, 120, 120, 121, 
121, 122, 122, 123, 123, 124, 125, 125, 126, 126, 127, 127, 128, 129, 129, 130, 130, 131, 132, 132, 
133, 133, 134, 134, 135, 136, 136, 137, 137, 138, 139, 139, 140, 140, 141, 142, 142, 143, 144, 144, 
145, 145, 146, 147, 147, 148, 149, 149, 150, 150, 151, 152, 152, 153, 154, 154, 155, 156, 156, 157, 
158, 158, 159, 159, 160, 161, 161, 162, 163, 163, 164, 165, 165, 166, 167, 167, 168, 169, 169, 170, 
171, 171, 172, 173, 174, 174, 175, 176, 176, 177, 178, 178, 179, 180, 180, 181, 182, 183, 183, 184, 
185, 185, 186, 187, 188, 188, 189, 190, 190, 191, 192, 193, 193, 194, 195, 195, 196, 197, 198, 198, 
199, 200, 201, 201, 202, 203, 204, 204, 205, 206, 207, 207, 208, 209, 210, 210, 211, 212, 213, 213, 
214, 215, 216, 216, 217, 218, 219, 220, 220, 221, 222, 223, 223, 224, 225, 226, 227, 227, 228, 229, 
230, 231, 231, 232, 233, 234, 235, 235, 236, 237, 238, 239, 239, 240, 241, 242, 243, 243, 244, 245, 
246, 247, 247, 248, 249, 250, 251, 252, 252, 253, 254, 255, 256, 257, 257, 258, 259, 260, 261, 262, 
262, 263, 264, 265, 266, 267, 268, 268, 269, 270, 271, 272, 273, 273, 274, 275, 276, 277, 278, 279, 
280, 280, 281, 282, 283, 284, 285, 286, 286, 287, 288, 289, 290, 291, 292, 293, 294, 294, 295, 296, 
297, 298, 299, 300, 301, 302, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 311, 312, 313, 314, 
315, 316, 317, 318, 319, 320, 321, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 332, 
333, 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 346, 346, 347, 348, 349, 350, 351, 
352, 353, 354, 355, 356, 357, 358, 359, 360, 361, 362, 363, 364, 364, 365, 366, 367, 368, 369, 370, 
371, 372, 373, 374, 375, 376, 377, 378, 379, 380, 381, 382, 383, 384, 385, 386, 387, 388, 389, 389, 
390, 391, 392, 393, 394, 395, 396, 397, 398, 399, 400, 401, 402, 403, 404, 405, 406, 407, 408, 409, 
410, 411, 412, 413, 414, 415, 416, 417, 418, 419, 420, 421, 422, 423, 424, 425, 426, 427, 428, 429, 
430, 431, 432, 433, 434, 435, 436, 437, 438, 439, 440, 441, 442, 443, 444, 445, 446, 447, 448, 449, 
450, 451, 452, 453, 454, 455, 456, 457, 458, 459, 460, 461, 462, 463, 464, 465, 466, 467, 468, 469, 
470, 471, 472, 473, 474, 475, 476, 477, 478, 479, 480, 481, 482, 483, 484, 485, 486, 487, 488, 489, 
490, 490, 491, 492, 493, 494, 495, 496, 497, 498, 499, 500, 501, 502, 503, 504, 505, 506, 507, 508, 
509, 510, 511, 512, 513, 514, 515, 516, 517, 518, 519, 520, 521, 522, 523, 524, 525, 526, 527, 528, 
529, 530, 531, 532, 533, 534, 535, 536, 537, 538, 539, 540, 541, 542, 543, 544, 545, 546, 547, 548, 
549, 550, 551, 552, 553, 554, 555, 556, 557, 558, 559, 560, 561, 562, 563, 564, 565, 566, 567, 568, 
569, 570, 571, 572, 573, 574, 575, 576, 577, 578, 579, 580, 581, 582, 583, 584, 585, 586, 587, 588, 
588, 589, 590, 591, 592, 593, 594, 595, 596, 597, 598, 599, 600, 601, 602, 603, 604, 605, 606, 607, 
608, 609, 610, 611, 612, 613, 613, 614, 615, 616, 617, 618, 619, 620, 621, 622, 623, 624, 625, 626, 
627, 628, 629, 630, 631, 631, 632, 633, 634, 635, 636, 637, 638, 639, 640, 641, 642, 643, 644, 645, 
645, 646, 647, 648, 649, 650, 651, 652, 653, 654, 655, 656, 656, 657, 658, 659, 660, 661, 662, 663, 
664, 665, 666, 666, 667, 668, 669, 670, 671, 672, 673, 674, 675, 675, 676, 677, 678, 679, 680, 681, 
682, 683, 683, 684, 685, 686, 687, 688, 689, 690, 691, 691, 692, 693, 694, 695, 696, 697, 697, 698, 
699, 700, 701, 702, 703, 704, 704, 705, 706, 707, 708, 709, 709, 710, 711, 712, 713, 714, 715, 715, 
716, 717, 718, 719, 720, 720, 721, 722, 723, 724, 725, 725, 726, 727, 728, 729, 730, 730, 731, 732, 
733, 734, 734, 735, 736, 737, 738, 738, 739, 740, 741, 742, 742, 743, 744, 745, 746, 746, 747, 748, 
749, 750, 750, 751, 752, 753, 754, 754, 755, 756, 757, 757, 758, 759, 760, 761, 761, 762, 763, 764, 
764, 765, 766, 767, 767, 768, 769, 770, 770, 771, 772, 773, 773, 774, 775, 776, 776, 777, 778, 779, 
779, 780, 781, 782, 782, 783, 784, 784, 785, 786, 787, 787, 788, 789, 789, 790, 791, 792, 792, 793, 
794, 794, 795, 796, 797, 797, 798, 799, 799, 800, 801, 801, 802, 803, 803, 804, 805, 806, 806, 807, 
808, 808, 809, 810, 810, 811, 812, 812, 813, 814, 814, 815, 816, 816, 817, 818, 818, 819, 819, 820, 
821, 821, 822, 823, 823, 824, 825, 825, 826, 827, 827, 828, 828, 829, 830, 830, 831, 832, 832, 833, 
833, 834, 835, 835, 836, 837, 837, 838, 838, 839, 840, 840, 841, 841, 842, 843, 843, 844, 844, 845, 
845, 846, 847, 847, 848, 848, 849, 850, 850, 851, 851, 852, 852, 853, 854, 854, 855, 855, 856, 856, 
857, 857, 858, 859, 859, 860, 860, 861, 861, 862, 862, 863, 864, 864, 865, 865, 866, 866, 867, 867, 
868, 868, 869, 869, 870, 870, 871, 871, 872, 873, 873, 874, 874, 875, 875, 876, 876, 877, 877, 878, 
878, 879, 879, 880, 880, 881, 881, 882, 882, 883, 883, 884, 884, 884, 885, 885, 886, 886, 887, 887, 
888, 888, 889, 889, 890, 890, 891, 891, 892, 892, 892, 893, 893, 894, 894, 895, 895, 896, 896, 896, 
897, 897, 898, 898, 899, 899, 900, 900, 900, 901, 901, 902, 902, 903, 903, 903, 904, 904, 905, 905, 
906, 906, 906, 907, 907, 908, 908, 908, 909, 909, 910, 910, 910, 911, 911, 912, 912, 912, 913, 913, 
914, 914, 914, 915, 915, 916, 916, 916, 917, 917, 917, 918, 918, 919, 919, 919, 920, 920, 920, 921, 
921, 921, 922, 922, 923, 923, 923, 924, 924, 924, 925, 925, 925, 926, 926, 926, 927, 927, 927, 928, 
928, 928, 929, 929, 929, 930, 930, 930, 931, 931, 931, 932, 932, 932, 933, 933, 933, 934, 934, 934, 
935, 935, 935, 936, 936, 936, 937, 937, 937, 937, 938, 938, 938, 939, 939, 939, 940, 940, 940, 940, 
941, 941, 941, 942, 942, 942, 942, 943, 943, 943, 944, 944, 944, 944, 945, 945, 945, 946, 946, 946, 
946, 947, 947, 947, 947, 948, 948, 948, 948, 949, 949, 949, 950, 950, 950, 950, 951, 951, 951, 951, 
952, 952, 952, 952, 953, 953, 953, 953, 954, 954, 954, 954, 954, 955, 955, 955, 955, 956, 956, 956, 
956, 957, 957, 957, 957, 957, 958, 958, 958, 958, 959, 959, 959, 959, 959, 960, 960, 960, 960, 961, 
961, 961, 961, 961, 962, 962, 962, 962, 962, 963, 963, 963, 963, 963, 964, 964, 964, 964, 964, 965, 
965, 965, 965, 965, 966, 966, 966, 966, 966, 967, 967, 967, 967, 967, 967, 968, 968, 968, 968, 968, 
969, 969, 969, 969, 969, 969, 970, 970, 970, 970, 970, 970, 971, 971, 971, 971, 971, 971, 972, 972, 
972, 972, 972, 972, 973, 973, 973, 973, 973, 973, 973, 974, 974, 974, 974, 974, 974, 975, 975, 975, 
975, 975, 975, 975, 976, 976, 976, 976, 976, 976, 976, 977, 977, 977, 977, 977, 977, 977, 978, 978, 
978, 978, 978, 978, 978, 978, 979, 979, 979, 979, 979, 979, 979, 979, 980, 980, 980, 980, 980, 980, 
980, 980, 981, 981, 981, 981, 981, 981, 981, 981};

    //****************************************
    // already #defined: N, I0, INVH, AMIN, AMAX
    #define ALPHA 1.83787706641  // = log(2*pi)
    double sim, simy, u;
    int k, ka, i;
    
    if (a<AMIN)  //if a is too small, use simple reject algorithm
        return ran_tg_reject(r,a);
    
    if (a>AMAX) // if a is too large, use Devroye's algorithm
        return ran_tg_devroye(r,a);

    i = I0+floor(a*INVH);
    ka = ncell[i];
    do {
      // sample integer between ka and N 
        k = ka+gsl_rng_uniform_int(r,N-ka+1); 
        if (k==N)  //right tail (last box on the right) 
                return ran_tg_devroye(r,x[N]); 
        if (k>ka+1)  {   // all the other boxes
            u = gsl_rng_uniform(r);
            simy = yu[k]*u;
            if (simy<yl[k]) { // that's what happens most of the time 
                sim = x[k]+u*delta[k];
                return sim;
            }
            // otherwise, check you're below the pdf curve
            sim = x[k]+d[k]*gsl_rng_uniform(r);
            if (sim*sim+2.*log(simy)+ALPHA<0.)
                return sim;
        }
	else {  // two leftmost regions 
            sim = x[k]+d[k]*gsl_rng_uniform(r);
            if (sim>=a) { //otherwise reject
                simy = yu[k]*gsl_rng_uniform(r);
                if (simy<yl[k])
                    return sim;
                if (sim*sim+2.*log(simy)+ALPHA<0.)
                    return sim;
                }
	}
    }
    while(1);

}


